Update src/runtime/internal/utils.ts

pull/7623/head
Simon H 4 years ago committed by GitHub
parent ac85a323f0
commit e080905f4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -192,5 +192,5 @@ export function action_destroyer(action_result) {
export function split_css_unit(value: number | string): [number, string] { export function split_css_unit(value: number | string): [number, string] {
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
return split ? [parseFloat(split[1]), split[2] || 'px'] : [value, 'px']; return split ? [parseFloat(split[1]), split[2] || 'px'] : [value as number, 'px'];
} }

Loading…
Cancel
Save