Skip to content

Commit 9b89285

Browse files
committed
fix: avoid normalizing class and style strings
Relates to nuxt/nuxt#31283
1 parent c7a4b78 commit 9b89285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/unhead/src/server/util/propsToString.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function propsToString(props: Record<string, any>) {
1212
let value = props[key]
1313

1414
// class (set) and style (map)
15-
if (key === 'class' || key === 'style') {
15+
if ((key === 'class' || key === 'style') && typeof value !== 'string') {
1616
value = key === 'class'
1717
? Array.from(value).join(' ')
1818
: Array.from(value as Map<string, string>)

0 commit comments

Comments
 (0)