Skip to content

Improved roesourceId emptiness check #16

Merged
merged 1 commit into from Nov 13, 2012

2 participants

@Entea
Entea commented Nov 8, 2012

Just used Ember.empty instead of comparing to undefined, because sometimes id field can be set to null.

@dgeb dgeb commented on an outdated diff Nov 13, 2012
src/ember-rest.js
@@ -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))
@dgeb
Cerebris Corporation member
dgeb added a note Nov 13, 2012

I agree with the use of empty, but the conditional needs to be !Ember.empty(id). I'll be glad to merge your PR if you make this change and squash your commits. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Entea
Entea commented Nov 13, 2012

Updated the code :) Hope it's good to merge.
Thanks for great library 👍

@dgeb dgeb merged commit 6fe6e55 into cerebris:master Nov 13, 2012
@dgeb
Cerebris Corporation member
dgeb commented Nov 13, 2012

Looks good - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.