Skip to content

Commit e8448b0

Browse files
committed
fix(ssr): fix hydration prop mismatch check for class on SVG elements
1 parent 8f339ea commit e8448b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-core/src/hydration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ function propHasMismatch(el: Element, key: string, clientValue: any): boolean {
718718
let actual: any
719719
let expected: any
720720
if (key === 'class') {
721-
actual = el.className
721+
actual = el.getAttribute('class')
722722
expected = normalizeClass(clientValue)
723723
if (actual !== expected) {
724724
mismatchType = mismatchKey = `class`

0 commit comments

Comments
 (0)