File tree 2 files changed +5
-5
lines changed
packages/runtime-core/src
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
10
10
import { PatchFlags , SlotFlags } from '@vue/shared'
11
11
import { warn } from '../warning'
12
12
13
- export let isRenderingTemplateSlot = false
13
+ export let shouldTrackInSlotRendering = 0
14
14
15
15
/**
16
16
* Compiler runtime helper for rendering `<slot/>`
@@ -39,7 +39,7 @@ export function renderSlot(
39
39
// invocation interfering with template-based block tracking, but in
40
40
// `renderSlot` we can be sure that it's template-based so we can force
41
41
// enable it.
42
- isRenderingTemplateSlot = true
42
+ shouldTrackInSlotRendering ++
43
43
const rendered = ( openBlock ( ) ,
44
44
createBlock (
45
45
Fragment ,
@@ -49,6 +49,6 @@ export function renderSlot(
49
49
? PatchFlags . STABLE_FRAGMENT
50
50
: PatchFlags . BAIL
51
51
) )
52
- isRenderingTemplateSlot = false
52
+ shouldTrackInSlotRendering --
53
53
return rendered
54
54
}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ import { currentRenderingInstance } from './componentRenderUtils'
36
36
import { RendererNode , RendererElement } from './renderer'
37
37
import { NULL_DYNAMIC_COMPONENT } from './helpers/resolveAssets'
38
38
import { hmrDirtyComponents } from './hmr'
39
- import { isRenderingTemplateSlot } from './helpers/renderSlot'
39
+ import { shouldTrackInSlotRendering } from './helpers/renderSlot'
40
40
41
41
export const Fragment = ( Symbol ( __DEV__ ? 'Fragment' : undefined ) as any ) as {
42
42
__isFragment : true
@@ -403,7 +403,7 @@ function _createVNode(
403
403
normalizeChildren ( vnode , children )
404
404
405
405
if (
406
- ( shouldTrack > 0 || isRenderingTemplateSlot ) &&
406
+ ( shouldTrack > 0 || shouldTrackInSlotRendering > 0 ) &&
407
407
// avoid a block node from tracking itself
408
408
! isBlockNode &&
409
409
// has current parent block
You can’t perform that action at this time.
0 commit comments