1
0
Fork 0

make jslint stop nagging

This commit is contained in:
scottashton 2014-06-03 16:30:23 +02:00
parent 8f347f2b54
commit af4d4e6d25
2 changed files with 10 additions and 9 deletions

View File

@ -93,15 +93,15 @@ ArangoCollection.prototype.toArray = function () {
///
/// Truncates a collection:
///
/// arango> col = db.examples;
/// [ArangoCollection 91022, "examples" (status new born)]
/// arango> col.save({ "Hello" : "World" });
/// { "_id" : "91022/1532814", "_rev" : 1532814 }
/// arango> col.count();
/// 1
/// arango> col.truncate();
/// arango> col.count();
/// 0
/// arango> col = db.examples;
/// [ArangoCollection 91022, "examples" (status new born)]
/// arango> col.save({ "Hello" : "World" });
/// { "_id" : "91022/1532814", "_rev" : 1532814 }
/// arango> col.count();
/// 1
/// arango> col.truncate();
/// arango> col.count();
/// 0
/// @endDocuBlock
////////////////////////////////////////////////////////////////////////////////

View File

@ -105,6 +105,7 @@ Model = function (attributes) {
};
Model.fromClient = function (attributes) {
'use strict';
var instance = new this();
instance.attributes = whitelistProperties(attributes, this.attributes, false);
instance.attributes = fillInDefaults(instance.attributes, this.attributes);