From d0e0b8810ab92c4dd4096ad69ada7f65ea37673a Mon Sep 17 00:00:00 2001 From: daiwei Date: Fri, 27 Sep 2024 15:23:00 +0800 Subject: [PATCH] chore: tweaks --- packages/runtime-core/src/hydration.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index 52abc18bf2f..c49db529c38 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -31,7 +31,7 @@ import { normalizeStyle, stringifyStyle, } from '@vue/shared' -import type { RendererInternals } from './renderer' +import { type RendererInternals, needTransition } from './renderer' import { setRef } from './rendererTemplateRef' import { type SuspenseBoundary, @@ -385,8 +385,10 @@ export function createHydrationFunctions( let needCallTransitionHooks = false if (isTemplateNode(el)) { needCallTransitionHooks = - transition && - !transition.persisted && + needTransition( + null, // no need check parentSuspense in hydration + transition, + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear