merging in #336.

This commit is contained in:
Jeremy Ashkenas
2011-05-26 15:49:16 -04:00
parent dae2527113
commit fb8da91e3e

View File

@@ -563,13 +563,12 @@
var attrs = model;
model = new this.model(null, {collection: this});
if (!model.set(attrs, options)) model = false;
}
else if (!model.collection) {
} else if (!model.collection) {
model.collection = this;
}
return model;
},
// Internal implementation of adding a single model to the set, updating
// hash indexes for `id` and `cid` lookups.
// Returns the model, or 'false' if validation on a new model fails.