fix(keep-alive): fix unmounting late-included components
fix #3648 based on #3650
This commit is contained in:
@@ -42,6 +42,7 @@ import { setTransitionHooks } from './BaseTransition'
|
||||
import { ComponentRenderContext } from '../componentPublicInstance'
|
||||
import { devtoolsComponentAdded } from '../devtools'
|
||||
import { isAsyncWrapper } from '../apiAsyncComponent'
|
||||
import { isSuspense } from './Suspense'
|
||||
|
||||
type MatchPattern = string | RegExp | (string | RegExp)[]
|
||||
|
||||
@@ -323,7 +324,7 @@ const KeepAliveImpl: ComponentOptions = {
|
||||
vnode.shapeFlag |= ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE
|
||||
|
||||
current = vnode
|
||||
return rawVNode
|
||||
return isSuspense(rawVNode.type) ? rawVNode : vnode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user