Skip to content

Commit c9c9dff

Browse files
authored
refactor(perf): assign value in if block (#10836)
1 parent ca7d421 commit c9c9dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/normalizeProp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export function stringifyStyle(
5151
}
5252
for (const key in styles) {
5353
const value = styles[key]
54-
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key)
5554
if (isString(value) || typeof value === 'number') {
55+
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key)
5656
// only render valid values
5757
ret += `${normalizedKey}:${value};`
5858
}

0 commit comments

Comments
 (0)