Skip to content

Commit

Permalink
Update BaseTransition.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 9, 2023
1 parent 40a74cb commit 5bbfba6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/runtime-core/src/components/BaseTransition.ts
Expand Up @@ -473,8 +473,9 @@ function emptyPlaceholder(vnode: VNode): VNode | undefined {

function getKeepAliveChild(vnode: VNode): VNode | undefined {
return isKeepAlive(vnode)
? // #7121 avoid the result is expired during HMR
vnode.component
? // #7121 ensure get the child component subtree in case
// it's been replaced during HMR
__DEV__ && vnode.component
? vnode.component.subTree
: vnode.children
? ((vnode.children as VNodeArrayChildren)[0] as VNode)
Expand Down

0 comments on commit 5bbfba6

Please sign in to comment.