Skip to content

Commit 4c41ea7

Browse files
committed
Merging issue jashkenas#216 (+ others) validation on Collection#create.
1 parent 7442f82 commit 4c41ea7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backbone.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,9 @@
511511
var coll = this;
512512
options || (options = {});
513513
if (!(model instanceof Backbone.Model)) {
514-
modelRef = model;
514+
var attrs = model;
515515
model = new this.model(null, {collection: coll});
516-
if(!model.set(modelRef)) return false;
516+
if (!model.set(attrs)) return false;
517517
} else {
518518
model.collection = coll;
519519
}

0 commit comments

Comments
 (0)