Created
March 9, 2016 18:51
-
-
Save Mariusio/b4e37b223c854b31f33b to your computer and use it in GitHub Desktop.
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
showDashboardLink: Ember.computed( | |
function() { | |
if (this.get('session.isAuthenticated')) { | |
return this.get('store').findAll('datasource').then((datasources) => { | |
this.get('store').filter('datasource', {}, function(datasource) { | |
return datasource.get('id') != null; | |
}).then((datasources) => { | |
if (datasources.get('length') != 0) { | |
return true | |
} else { | |
return false | |
} | |
}); | |
}); | |
} else { | |
return false | |
} | |
} | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
unnecesary bind