[Pkg-javascript-commits] [backbone] 108/211: Check for model before accessing its properties, fixes #319
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:00:10 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 1499d755b62a7a57ac71356b3cc0999349504da2
Author: Jacek Becela <jacek.becela at gmail.com>
Date: Fri Apr 15 09:34:18 2011 +0200
Check for model before accessing its properties, fixes #319
---
backbone.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backbone.js b/backbone.js
index ed88feb..bb3bc54 100644
--- a/backbone.js
+++ b/backbone.js
@@ -619,7 +619,7 @@
if (ev == 'destroy') {
this._remove(model, options);
}
- if (ev === 'change:' + model.idAttribute) {
+ if (model && ev === 'change:' + model.idAttribute) {
delete this._byId[model.previous(model.idAttribute)];
this._byId[model.id] = 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