From 1a316b8a7267163f70ff8c6bc2d09bb435754ab3 Mon Sep 17 00:00:00 2001 From: mylmz10 Date: Sat, 7 Mar 2020 20:32:48 +0300 Subject: [PATCH] Set length value to auto when length is undefined --- nativescript-core/ui/core/view/view.android.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nativescript-core/ui/core/view/view.android.ts b/nativescript-core/ui/core/view/view.android.ts index 2388aa67c..bbfab0194 100644 --- a/nativescript-core/ui/core/view/view.android.ts +++ b/nativescript-core/ui/core/view/view.android.ts @@ -1116,7 +1116,7 @@ function createNativePercentLengthProperty(options: NativePercentLengthPropertyO setPercent = options.setPercent || percentNotSupported; options = null; } - if (length == "auto") { // tslint:disable-line + if (length == "auto" || !length) { // tslint:disable-line setPixels(this.nativeViewProtected, auto); } else if (typeof length === "number") { setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length)));