File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 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'
2525import { extend , isArray } from '@vue/shared'
2626import { EffectScope , pauseTracking , resetTracking } from '@vue/reactivity'
2727
28- export const teleportStack : TeleportFragment [ ] = [ ]
28+ export const teleportStack : TeleportFragment [ ] = __DEV__
29+ ? ( [ ] as TeleportFragment [ ] )
30+ : ( undefined as any )
2931export const instanceToTeleportMap : WeakMap <
3032 VaporComponentInstance ,
3133 TeleportFragment
32- > = __DEV__ ? new WeakMap ( ) : ( null as any )
34+ > = __DEV__ ? new WeakMap ( ) : ( undefined as any )
3335
3436/**
3537 * dev only.
36- * when the ** root** child component updates, synchronously update
38+ * when the root child component updates, synchronously update
3739 * the TeleportFragment's children and nodes.
3840 */
39- export function handleTeleportChildrenHmrReload (
41+ export function handleTeleportRootComponentHmrReload (
4042 instance : VaporComponentInstance ,
4143 newInstance : VaporComponentInstance ,
4244) : void {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
1313 mountComponent ,
1414 unmountComponent ,
1515} from './component'
16- import { handleTeleportChildrenHmrReload } from './components/Teleport'
16+ import { handleTeleportRootComponentHmrReload } from './components/Teleport'
1717
1818export function hmrRerender ( instance : VaporComponentInstance ) : void {
1919 const normalized = normalizeBlock ( instance . block )
@@ -55,5 +55,5 @@ export function hmrReload(
5555 )
5656 simpleSetCurrentInstance ( prev , instance . parent )
5757 mountComponent ( newInstance , parent , anchor )
58- handleTeleportChildrenHmrReload ( instance , newInstance )
58+ handleTeleportRootComponentHmrReload ( instance , newInstance )
5959}
You can’t perform that action at this time.
0 commit comments