We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e776ae commit ad243e7Copy full SHA for ad243e7
packages/compiler-core/src/transforms/vFor.ts
@@ -42,6 +42,7 @@ import {
42
import {
43
FRAGMENT,
44
IS_MEMO_SAME,
45
+ KEEP_ALIVE,
46
OPEN_BLOCK,
47
RENDER_LIST,
48
} from '../runtimeHelpers'
@@ -208,7 +209,9 @@ export const transformFor: NodeTransform = createStructuralDirectiveTransform(
208
209
)
210
}
211
- childBlock.isBlock = !isStableFragment
212
+ // always track KeepAlive children as block
213
+ childBlock.isBlock =
214
+ childBlock.tag === KEEP_ALIVE || !isStableFragment
215
if (childBlock.isBlock) {
216
helper(OPEN_BLOCK)
217
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent))
0 commit comments