File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/core/image-asset Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ export class ImageAsset extends ImageAssetBase {
2626 }
2727
2828 public getImageAsync ( callback : ( image , error ) => void ) {
29+ // Fix for issue #6289: ensure numeric width/height
30+ if ( this . options ) {
31+ if ( typeof this . options . width === "string" ) {
32+ this . options . width = parseInt ( this . options . width , 10 ) ;
33+ }
34+ if ( typeof this . options . height === "string" ) {
35+ this . options . height = parseInt ( this . options . height , 10 ) ;
36+ }
37+ }
38+
2939 org . nativescript . widgets . Utils . loadImageAsync (
3040 getNativeApp < android . app . Application > ( ) . getApplicationContext ( ) ,
3141 this . android ,
@@ -42,4 +52,5 @@ export class ImageAsset extends ImageAssetBase {
4252 } ) ,
4353 ) ;
4454 }
55+
4556}
You can’t perform that action at this time.
0 commit comments