Permalink
Browse files

Added Ember.empty checks for resourceId value

  • Loading branch information...
1 parent ac525e5 commit 6fe6e55c70b9dfedb170a3c57b3dea191d4d470a @Entea Entea committed Nov 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/ember-rest.js
View
@@ -211,7 +211,7 @@ Ember.Resource = Ember.Object.extend(Ember.ResourceAdapter, Ember.Copyable, {
Is this a new resource?
*/
isNew: function() {
- return (this._resourceId() === undefined);
+ return Ember.empty(this._resourceId());
},
/**
@@ -224,7 +224,7 @@ Ember.Resource = Ember.Object.extend(Ember.ResourceAdapter, Ember.Copyable, {
var url = this.resourceUrl,
id = this._resourceId();
- if (id !== undefined)
+ if (!Ember.empty(id))
url += '/' + id;
return url;

0 comments on commit 6fe6e55

Please sign in to comment.