Skip to content

Instantly share code, notes, and snippets.

@chrism
Last active August 29, 2015 14:10
Show Gist options
  • Save chrism/f91ec9a275efb47f90f0 to your computer and use it in GitHub Desktop.
Save chrism/f91ec9a275efb47f90f0 to your computer and use it in GitHub Desktop.
Strange return behaviour...
// this works...
return 'ppp'
// this logs 1
this.container.lookup('store:main').find('user_profile', 1).then(function(user_profile) {
var userId = user_profile.get('id');
Ember.Logger.log('id is...', userId);
})
// but this returns undefined??
return this.container.lookup('store:main').find('user_profile', 1).then(function(user_profile) {
var userId = user_profile.get('id');
return userId;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment