[Pkg-javascript-commits] [backbone] 10/21: updated model isNew to use idAttribute
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:01:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.5.2
in repository backbone.
commit 70cc8ee87b92263cae79c3c6fe63df6f6c0aef68
Author: Tim Branyen <tim at tabdeveloper.com>
Date: Thu Jul 21 22:00:05 2011 -0400
updated model isNew to use idAttribute
---
backbone.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backbone.js b/backbone.js
index 1842926..14431e7 100644
--- a/backbone.js
+++ b/backbone.js
@@ -342,7 +342,7 @@
// A model is new if it has never been saved to the server, and lacks an id.
isNew : function() {
- return this.id == null;
+ return this[this.idAttribute] == null;
},
// Call this method to manually fire a `change` event for this model.
--
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