Skip to content

Commit 7609f1f

Browse files
committed
Merge pull request NativeScript#131 from NativeScript/image-cache-fix
Fixed: image-cache exception NativeScript#127
2 parents 315959a + d7f4f72 commit 7609f1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/image-cache/image-cache-common.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ export class Cache extends observable.Observable implements definition.Cache {
125125
public _onDownloadCompleted(key: string, image: any) {
126126
var request = <DownloadRequest>this._pendingDownloads[key];
127127

128-
this.set(request.key, image);
128+
if (request.key && image) {
129+
this.set(request.key, image);
130+
}
129131

130132
this._currentDownloads--;
131133

0 commit comments

Comments
 (0)