mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'master' into animate-width-height
This commit is contained in:
@@ -91,6 +91,7 @@ export class Button extends ButtonBase {
|
||||
this._highlightedHandler = this._highlightedHandler || ((args: TouchGestureEventData) => {
|
||||
switch (args.action) {
|
||||
case TouchAction.up:
|
||||
case TouchAction.cancel:
|
||||
this._goToVisualState("normal");
|
||||
break;
|
||||
case TouchAction.down:
|
||||
|
||||
@@ -72,7 +72,11 @@ export class Cache extends common.Cache {
|
||||
.then((response) => {
|
||||
try {
|
||||
const image = UIImage.alloc().initWithData(response.content.raw);
|
||||
this._onDownloadCompleted(request.key, image);
|
||||
if (image) {
|
||||
this._onDownloadCompleted(request.key, image);
|
||||
} else {
|
||||
this._onDownloadError(request.key, new Error("No result for provided url"));
|
||||
}
|
||||
} catch (err) {
|
||||
this._onDownloadError(request.key, err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user