mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(Image): catch Response content may not be converted to an Image (#5856)
closes https://github.com/NativeScript/nativescript-angular/issues/851 closes https://github.com/NativeScript/NativeScript/issues/3381
This commit is contained in:
committed by
Alexander Vakrilov
parent
0c3ecbc57b
commit
5cd8a1fc2a
@@ -33,7 +33,7 @@ export function getJSON<T>(arg: any): Promise<T> {
|
||||
export function getImage(arg: any): Promise<ImageSource> {
|
||||
return httpRequest
|
||||
.request(typeof arg === "string" ? { url: arg, method: "GET" } : arg)
|
||||
.then(responce => responce.content.toImage());
|
||||
.then(response => response.content.toImage());
|
||||
}
|
||||
|
||||
export function getFile(arg: any, destinationFilePath?: string): Promise<any> {
|
||||
|
||||
Reference in New Issue
Block a user