File tree 2 files changed +8
-6
lines changed
packages/runtime-vapor/src
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,20 @@ import { renderEffect } from '../renderEffect'
25
25
import { extend , isArray } from '@vue/shared'
26
26
import { EffectScope , pauseTracking , resetTracking } from '@vue/reactivity'
27
27
28
- export const teleportStack : TeleportFragment [ ] = [ ]
28
+ export const teleportStack : TeleportFragment [ ] = __DEV__
29
+ ? ( [ ] as TeleportFragment [ ] )
30
+ : ( undefined as any )
29
31
export const instanceToTeleportMap : WeakMap <
30
32
VaporComponentInstance ,
31
33
TeleportFragment
32
- > = __DEV__ ? new WeakMap ( ) : ( null as any )
34
+ > = __DEV__ ? new WeakMap ( ) : ( undefined as any )
33
35
34
36
/**
35
37
* dev only.
36
- * when the ** root** child component updates, synchronously update
38
+ * when the root child component updates, synchronously update
37
39
* the TeleportFragment's children and nodes.
38
40
*/
39
- export function handleTeleportChildrenHmrReload (
41
+ export function handleTeleportRootComponentHmrReload (
40
42
instance : VaporComponentInstance ,
41
43
newInstance : VaporComponentInstance ,
42
44
) : void {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
13
13
mountComponent ,
14
14
unmountComponent ,
15
15
} from './component'
16
- import { handleTeleportChildrenHmrReload } from './components/Teleport'
16
+ import { handleTeleportRootComponentHmrReload } from './components/Teleport'
17
17
18
18
export function hmrRerender ( instance : VaporComponentInstance ) : void {
19
19
const normalized = normalizeBlock ( instance . block )
@@ -55,5 +55,5 @@ export function hmrReload(
55
55
)
56
56
simpleSetCurrentInstance ( prev , instance . parent )
57
57
mountComponent ( newInstance , parent , anchor )
58
- handleTeleportChildrenHmrReload ( instance , newInstance )
58
+ handleTeleportRootComponentHmrReload ( instance , newInstance )
59
59
}
You can’t perform that action at this time.
0 commit comments