]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(ssr): fix hydration prop mismatch check for class on SVG elements
authorEvan You <yyx990803@gmail.com>
Tue, 19 Dec 2023 10:09:42 +0000 (18:09 +0800)
committerEvan You <yyx990803@gmail.com>
Tue, 19 Dec 2023 10:09:42 +0000 (18:09 +0800)
packages/runtime-core/src/hydration.ts

index b873a37dc0631c8b49392d685c21346c74f0e688..57ced5118a63896f010e60dacae73ecd9750e89e 100644 (file)
@@ -718,7 +718,7 @@ function propHasMismatch(el: Element, key: string, clientValue: any): boolean {
   let actual: any
   let expected: any
   if (key === 'class') {
-    actual = el.className
+    actual = el.getAttribute('class')
     expected = normalizeClass(clientValue)
     if (actual !== expected) {
       mismatchType = mismatchKey = `class`