From ec26253f77d44fec9976d1ea4ab1f2d97f0b2172 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 22 Apr 2014 10:39:15 +0200 Subject: [PATCH] fix handling of properties with value `false` --- .../frontend/js/modules/org/arangodb/arango-collection.js | 8 ++++---- js/client/modules/org/arangodb/arango-collection.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/arango-collection.js b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/arango-collection.js index f34237ee69..07021532b9 100644 --- a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/arango-collection.js +++ b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/arango-collection.js @@ -336,10 +336,10 @@ ArangoCollection.prototype.properties = function (properties) { var body = {}; for (a in attributes) { - if (attributes.hasOwnProperty(a)) { - if (properties.hasOwnProperty(a) && properties[a]) { - body[a] = properties[a]; - } + if (attributes.hasOwnProperty(a) && + attributes[a] && + properties.hasOwnProperty(a)) { + body[a] = properties[a]; } } diff --git a/js/client/modules/org/arangodb/arango-collection.js b/js/client/modules/org/arangodb/arango-collection.js index 6bc874974b..c0228ddd96 100644 --- a/js/client/modules/org/arangodb/arango-collection.js +++ b/js/client/modules/org/arangodb/arango-collection.js @@ -336,10 +336,10 @@ ArangoCollection.prototype.properties = function (properties) { var body = {}; for (a in attributes) { - if (attributes.hasOwnProperty(a)) { - if (properties.hasOwnProperty(a) && properties[a]) { - body[a] = properties[a]; - } + if (attributes.hasOwnProperty(a) && + attributes[a] && + properties.hasOwnProperty(a)) { + body[a] = properties[a]; } }