1
0
Fork 0

fix handling of properties with value `false`

This commit is contained in:
Jan Steemann 2014-04-22 10:39:15 +02:00
parent d3e57c9e3c
commit ec26253f77
2 changed files with 8 additions and 8 deletions

View File

@ -336,12 +336,12 @@ ArangoCollection.prototype.properties = function (properties) {
var body = {};
for (a in attributes) {
if (attributes.hasOwnProperty(a)) {
if (properties.hasOwnProperty(a) && properties[a]) {
if (attributes.hasOwnProperty(a) &&
attributes[a] &&
properties.hasOwnProperty(a)) {
body[a] = properties[a];
}
}
}
requestResult = this._database._connection.PUT(this._baseurl("properties"),
JSON.stringify(body));

View File

@ -336,12 +336,12 @@ ArangoCollection.prototype.properties = function (properties) {
var body = {};
for (a in attributes) {
if (attributes.hasOwnProperty(a)) {
if (properties.hasOwnProperty(a) && properties[a]) {
if (attributes.hasOwnProperty(a) &&
attributes[a] &&
properties.hasOwnProperty(a)) {
body[a] = properties[a];
}
}
}
requestResult = this._database._connection.PUT(this._baseurl("properties"),
JSON.stringify(body));