Skip to content

Commit 1a316b8

Browse files
committed
Set length value to auto when length is undefined
1 parent 286fcd3 commit 1a316b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nativescript-core/ui/core/view/view.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ function createNativePercentLengthProperty(options: NativePercentLengthPropertyO
11161116
setPercent = options.setPercent || percentNotSupported;
11171117
options = null;
11181118
}
1119-
if (length == "auto") { // tslint:disable-line
1119+
if (length == "auto" || !length) { // tslint:disable-line
11201120
setPixels(this.nativeViewProtected, auto);
11211121
} else if (typeof length === "number") {
11221122
setPixels(this.nativeViewProtected, layout.round(layout.toDevicePixels(length)));

0 commit comments

Comments
 (0)