mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Model.constructor only take attrs, not models.
As per discussion in #873.
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