mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #462 from NativeScript/nnikolov/CutenessImpovement
Cuteness now uses the first url with-in preview images.
This commit is contained in:
@ -79,7 +79,13 @@ export class RedditViewModel extends observable.Observable {
|
||||
|
||||
get imageSource(): imageSource.ImageSource {
|
||||
if (this._source) {
|
||||
var url = this._source.url;
|
||||
var url;
|
||||
try {
|
||||
url = (<any>this._source).preview.images[0].source.url;
|
||||
}
|
||||
catch (e) {
|
||||
url = this._source.url;
|
||||
}
|
||||
|
||||
if (_isValidImageUrl(url)) {
|
||||
|
||||
|
Reference in New Issue
Block a user