Attributes should remain a safe copy.

This commit is contained in:
Jeremy Ashkenas
2010-10-07 09:01:59 -04:00
parent 9bdefd0273
commit d0e27756f2

View File

@@ -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();
};