From e8448b018d9f837c08eace90cab404a27f68e31a Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 19 Dec 2023 18:09:42 +0800 Subject: [PATCH] fix(ssr): fix hydration prop mismatch check for class on SVG elements --- packages/runtime-core/src/hydration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index b873a37dc..57ced5118 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -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`