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