Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Oct 22, 2023
1 parent 91128ed commit 8875c26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,9 @@ export function createHydrationFunctions(
if (isTemplateNode(el)) {
needCallTransitionHooks =
needTransition(parentSuspense, transition) &&
vnode.props &&
vnode.props.appear
parentComponent &&
parentComponent.vnode.props &&
parentComponent.vnode.props.appear

const content = (el as HTMLTemplateElement).content
.firstChild as Element
Expand Down Expand Up @@ -633,7 +634,6 @@ export function createHydrationFunctions(
if (parent.vnode.el === oldNode) {
parent.vnode.el = newNode
parent.subTree.el = newNode
break
}
parent = parent.parent
}
Expand Down

0 comments on commit 8875c26

Please sign in to comment.