[Pkg-javascript-commits] [backbone] 03/281: Fix for unset attributes not being returned by changedAttributes

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:01:50 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 98877ff4b67259f45c74799c148bd5b30e13db87
Author: Steve Mason <stevem at brandwatch.com>
Date:   Thu Aug 11 08:53:55 2011 +0100

    Fix for unset attributes not being returned by changedAttributes
---
 backbone.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backbone.js b/backbone.js
index b2e4932..0a02645 100644
--- a/backbone.js
+++ b/backbone.js
@@ -374,6 +374,12 @@
           changed[attr] = now[attr];
         }
       }
+      for (attr in old){
+        if (!(attr in now)){
+          changed = changed || {};
+          changed[attr] = void 0;
+        }
+      }
       return changed;
     },
 

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