Created
April 1, 2013 03:05
-
-
Save wmill/5283022 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
App.RedditLink = Ember.Object.extend({ | |
/* | |
It seems reddit will return the string 'default' when there's no thumbnail present. | |
This computed property will convert 'default' to null to avoid rendering a broken | |
image link. | |
*/ | |
thumbnailUrl: function() { | |
var thumbnail = this.get('thumbnail'); | |
return (thumbnail === 'default') ? null : thumbnail; | |
}.property('thumbnail'), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment