mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
Fix PercentLength crash
This commit is contained in:
@ -1034,6 +1034,9 @@ export type PercentLength = "auto" | number | {
|
||||
|
||||
export namespace PercentLength {
|
||||
export function parse(value: string | Length): PercentLength {
|
||||
if (value == "auto") { // tslint:disable-line
|
||||
return "auto";
|
||||
}
|
||||
if (typeof value === "string") {
|
||||
let type: "%" | "dip" | "px";
|
||||
let numberValue = 0;
|
||||
|
Reference in New Issue
Block a user