[Pkg-javascript-commits] [backbone] 46/101: Attributes should	remain a safe copy.
    Jonas Smedegaard 
    js at moszumanska.debian.org
       
    Sat May  3 16:58:27 UTC 2014
    
    
  
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.1.0
in repository backbone.
commit d0e27756f287e97c4b99d34a4151a4d913091789
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Thu Oct 7 09:01:59 2010 -0400
    Attributes should remain a safe copy.
---
 backbone.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/backbone.js b/backbone.js
index 75e89a8..350bbee 100644
--- a/backbone.js
+++ b/backbone.js
@@ -101,9 +101,8 @@
   // If you do not specify the id, a negative id will be assigned for you.
   Backbone.Model = function(attributes) {
     this._attributes = {};
-    attributes = attributes || {};
-    this.set(attributes, {silent : true});
     this.cid = _.uniqueId('c');
+    this.set(attributes || {}, {silent : true});
     this._formerAttributes = this.attributes();
   };
 
-- 
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