mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
Merge pull request #881 from braddunbar/ctor-args
Model.constructor only take attrs, not models.
This commit is contained in:
@@ -364,7 +364,7 @@
|
||||
|
||||
// Create a new model with identical attributes to this one.
|
||||
clone : function() {
|
||||
return new this.constructor(this);
|
||||
return new this.constructor(this.attributes);
|
||||
},
|
||||
|
||||
// A model is new if it has never been saved to the server, and lacks an id.
|
||||
|
||||
Reference in New Issue
Block a user