Skip to content

Commit 1a1a63d

Browse files
committed
chore: minor tweaks
1 parent 6754842 commit 1a1a63d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/runtime-core/src/hydration.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,11 @@ export function createHydrationFunctions(
398398
parentComponent.vnode.props.appear
399399

400400
const content = (el as HTMLTemplateElement).content
401-
.firstChild as Element & { $cls: string | null }
401+
.firstChild as Element & { $cls?: string }
402402

403403
if (needCallTransitionHooks) {
404-
content.$cls = content.getAttribute('class')
404+
const cls = content.getAttribute('class')
405+
if (cls) content.$cls = cls
405406
transition!.beforeEnter(content)
406407
}
407408

@@ -787,7 +788,7 @@ export function createHydrationFunctions(
787788
* Dev only
788789
*/
789790
function propHasMismatch(
790-
el: Element & { $cls?: string | null },
791+
el: Element & { $cls?: string },
791792
key: string,
792793
clientValue: any,
793794
vnode: VNode,

0 commit comments

Comments
 (0)