Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merging in #336.
  • Loading branch information
jashkenas committed May 26, 2011
1 parent dae2527 commit fb8da91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backbone.js
Expand Up @@ -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.
Expand Down

0 comments on commit fb8da91

Please sign in to comment.