summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-06-26 15:34:52 -0700
committerAaron Parecki <aaron@parecki.com>2017-06-26 15:34:52 -0700
commitcbde68bafe96479358416021a93a311d3dc8f5cc (patch)
tree3ca8a3c6ea47ef27a7c82c3d672c35497e13bbfa /views
parent820ad1b8271dc7dbf1dba8eb37ab63b999159d09 (diff)
only send photo property if there is a photo
Diffstat (limited to 'views')
-rw-r--r--views/new-post.php2
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[]");