[Pkg-javascript-commits] [backbone] 233/281: Model.constructor only take attrs, not models.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:02:16 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.9.0
in repository backbone.
commit 66161b06fd3e52e07c65a9f24b6ac31da8c6adcf
Author: Brad Dunbar <dunbarb2 at gmail.com>
Date: Wed Jan 18 23:06:12 2012 -0500
Model.constructor only take attrs, not models.
As per discussion in #873.
---
backbone.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backbone.js b/backbone.js
index 5810783..d1ef1fd 100644
--- a/backbone.js
+++ b/backbone.js
@@ -364,7 +364,7 @@
// Create a new model with identical attributes to this one.
clone : function() {
- return new this.constructor(this);
+ return new this.constructor(this.attributes);
},
// A model is new if it has never been saved to the server, and lacks an id.
--
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