Skip to content

Commit

Permalink
Merge pull request jashkenas#495 from tbranyen/isNew
Browse files Browse the repository at this point in the history
updated model isNew to use idAttribute
  • Loading branch information
jashkenas committed Jul 22, 2011
2 parents ca8a049 + 70cc8ee commit a6a478f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.js
Expand Up @@ -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.
Expand Down

0 comments on commit a6a478f

Please sign in to comment.