Skip to content

Commit

Permalink
* core: refactor toCssSize helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Oct 17, 2023
1 parent 6153ca1 commit 07bb80d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/helpers/size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function toCssSize(size: SizeSetting | undefined | null): string | null {
}
const [val, unit = 'px'] = parseSize(size);
if (Number.isNaN(val)) {
return null;
return typeof size === 'string' ? size : null;
}
return `${val}${unit}`;
}

0 comments on commit 07bb80d

Please sign in to comment.