From: Evan You Date: Tue, 19 Dec 2023 10:09:42 +0000 (+0800) Subject: fix(ssr): fix hydration prop mismatch check for class on SVG elements X-Git-Tag: v3.4.0-beta.4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8448b018d9f837c08eace90cab404a27f68e31a;p=thirdparty%2Fvuejs%2Fcore.git fix(ssr): fix hydration prop mismatch check for class on SVG elements --- diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index b873a37dc0..57ced5118a 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`