From: Evan You Date: Fri, 7 Feb 2020 22:00:39 +0000 (-0500) Subject: fix(runtime-core): fix keep-alive tree-shaking X-Git-Tag: v3.0.0-alpha.5~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b43764eacb59ff6ebba3195a55af4ac0cf253bb;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): fix keep-alive tree-shaking --- diff --git a/packages/runtime-core/src/components/KeepAlive.ts b/packages/runtime-core/src/components/KeepAlive.ts index 3d76113b0f..18105efa5a 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