[Pkg-javascript-commits] [backbone] 62/211: Merging issue #216 (+ others) validation on Collection#create.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:00:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.5.0
in repository backbone.
commit 4c41ea7c7d7cd93f3456e632d8aa612f28ea3fca
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Sun Feb 6 08:48:38 2011 -0500
Merging issue #216 (+ others) validation on Collection#create.
---
backbone.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backbone.js b/backbone.js
index 60747da..2d5461b 100644
--- a/backbone.js
+++ b/backbone.js
@@ -511,9 +511,9 @@
var coll = this;
options || (options = {});
if (!(model instanceof Backbone.Model)) {
- modelRef = model;
+ var attrs = model;
model = new this.model(null, {collection: coll});
- if(!model.set(modelRef)) return false;
+ if (!model.set(attrs)) return false;
} else {
model.collection = coll;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list