]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(KeepAlive): remove cached VNode properly (#5260)
authoredison <daiwei521@126.com>
Sun, 16 Jan 2022 07:37:14 +0000 (15:37 +0800)
committerGitHub <noreply@github.com>
Sun, 16 Jan 2022 07:37:14 +0000 (02:37 -0500)
fix #5258

packages/runtime-core/src/components/KeepAlive.ts

index 08e28616e9c294fd3d24c1c5b3ccef6fff4f78f4..7a9419f3b634e69eb462b210981708d07fdcd116 100644 (file)
@@ -174,7 +174,7 @@ const KeepAliveImpl: ComponentOptions = {
     function unmount(vnode: VNode) {
       // reset the shapeFlag so it can be properly unmounted
       resetShapeFlag(vnode)
-      _unmount(vnode, instance, parentSuspense)
+      _unmount(vnode, instance, parentSuspense, true)
     }
 
     function pruneCache(filter?: (name: string) => boolean) {