Skip to content

Commit 7a29f31

Browse files
Plumbiulynxlangya
authored andcommitted
refactor(perf): assign value in if block (vuejs#10836)
1 parent e7ddedf commit 7a29f31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/normalizeProp.ts

+1-1
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)