[Pkg-javascript-commits] [backbone] 36/173: Fix 1.2.2 Model#id regression

Jonas Smedegaard dr at jones.dk
Wed Aug 31 07:43:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository backbone.

commit fda02db428c464badb12010c990622ee91f28a48
Author: Justin Ridgewell <justin at ridgewell.name>
Date:   Thu Oct 22 11:04:25 2015 -0400

    Fix 1.2.2 Model#id regression
    
    Fixes #3778.
---
 backbone.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index bbc63fd..1b20a08 100644
--- a/backbone.js
+++ b/backbone.js
@@ -506,7 +506,7 @@
       }
 
       // Update the `id`.
-      this.id = this.get(this.idAttribute);
+      if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
 
       // Trigger all relevant attribute changes.
       if (!silent) {

-- 
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