mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Prefer positive conditionals
This commit is contained in:
@@ -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 as string) : `${px}px`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user