From 70cc8ee87b92263cae79c3c6fe63df6f6c0aef68 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 21 Jul 2011 22:00:05 -0400 Subject: [PATCH] updated model isNew to use idAttribute --- backbone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.js b/backbone.js index 1842926d9..14431e719 100644 --- a/backbone.js +++ b/backbone.js @@ -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.