Fix logic

Co-Authored-By: Konnor Rogers <konnor5456@gmail.com>
This commit is contained in:
Lea Verou
2024-12-13 10:45:55 -05:00
parent ff1e048770
commit a2ba049bbd

View File

@@ -59,5 +59,5 @@ export function toPx(value: string | number, element: HTMLElement | SVGElement =
}
export function toLength(px: number | string): string {
return Number.isNaN(Number(px)) ? `${px}px` : (px as string);
return !Number.isNaN(Number(px)) ? `${px}px` : (px as string);
}