diff options
author | Aaron Parecki <aaron@parecki.com> | 2017-06-26 15:34:52 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2017-06-26 15:34:52 -0700 |
commit | cbde68bafe96479358416021a93a311d3dc8f5cc (patch) | |
tree | 3ca8a3c6ea47ef27a7c82c3d672c35497e13bbfa | |
parent | 820ad1b8271dc7dbf1dba8eb37ab63b999159d09 (diff) |
only send photo property if there is a photo
-rw-r--r-- | views/new-post.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/views/new-post.php b/views/new-post.php index 4fbad4b..fb0b3fc 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -677,7 +677,7 @@ $(function(){ if(photos.length == 1) { entry['photo'] = []; appendPhotoToFormData(photos[0], "photo"); - } else { + } else if(photos.length > 1) { entry['photo'] = []; for(i=0; i<photos.length; i++) { appendPhotoToFormData(photos[i], "photo[]"); |