fix(runtime-core): fix keep-alive tree-shaking

This commit is contained in:
Evan You 2020-02-07 17:00:39 -05:00
parent 9e51297702
commit 5b43764eac

View File

@ -283,7 +283,7 @@ function registerKeepAliveHook(
if (target) { if (target) {
let current = target.parent let current = target.parent
while (current && current.parent) { while (current && current.parent) {
if (current.parent.type === KeepAliveImpl) { if (isKeepAlive(current.parent.vnode)) {
injectToKeepAliveRoot(wrappedHook, type, target, current) injectToKeepAliveRoot(wrappedHook, type, target, current)
} }
current = current.parent current = current.parent