From 5b43764eacb59ff6ebba3195a55af4ac0cf253bb Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 7 Feb 2020 17:00:39 -0500 Subject: [PATCH] fix(runtime-core): fix keep-alive tree-shaking --- packages/runtime-core/src/components/KeepAlive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/components/KeepAlive.ts b/packages/runtime-core/src/components/KeepAlive.ts index 3d76113b0..18105efa5 100644 --- a/packages/runtime-core/src/components/KeepAlive.ts +++ b/packages/runtime-core/src/components/KeepAlive.ts @@ -283,7 +283,7 @@ function registerKeepAliveHook( if (target) { let current = target.parent while (current && current.parent) { - if (current.parent.type === KeepAliveImpl) { + if (isKeepAlive(current.parent.vnode)) { injectToKeepAliveRoot(wrappedHook, type, target, current) } current = current.parent