Last active
August 29, 2015 14:10
-
-
Save chrism/f91ec9a275efb47f90f0 to your computer and use it in GitHub Desktop.
Strange return behaviour...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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