mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
updated model isNew to use idAttribute
This commit is contained in:
@@ -342,7 +342,7 @@
|
||||
|
||||
// A model is new if it has never been saved to the server, and lacks an id.
|
||||
isNew : function() {
|
||||
return this.id == null;
|
||||
return this[this.idAttribute] == null;
|
||||
},
|
||||
|
||||
// Call this method to manually fire a `change` event for this model.
|
||||
|
||||
Reference in New Issue
Block a user