Skip to content

Commit 5b43764

Browse files
committed
fix(runtime-core): fix keep-alive tree-shaking
1 parent 9e51297 commit 5b43764

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function registerKeepAliveHook(
283283
if (target) {
284284
let current = target.parent
285285
while (current && current.parent) {
286-
if (current.parent.type === KeepAliveImpl) {
286+
if (isKeepAlive(current.parent.vnode)) {
287287
injectToKeepAliveRoot(wrappedHook, type, target, current)
288288
}
289289
current = current.parent

0 commit comments

Comments
 (0)