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 fc98351 commit 39ca181Copy full SHA for 39ca181
packages/runtime-core/src/hmr.ts
@@ -172,6 +172,8 @@ function reload(id: string, newComp: HMRComponent): void {
172
isHmrUpdating = true
173
const parent = instance.parent! as ComponentInternalInstance
174
if (parent.vapor) {
175
+ // ensure unregisterHMR is called to avoid stale instances
176
+ instance.scope.stop()
177
parent.hmrRerender!()
178
} else {
179
if (!(parent.effect.flags! & EffectFlags.STOP)) {
packages/runtime-vapor/src/hmr.ts
@@ -38,6 +38,7 @@ export function hmrReload(
38
): void {
39
// if parent is KeepAlive, we need to rerender it
40
if (instance.parent && isKeepAlive(instance.parent)) {
41
42
instance.parent.hmrRerender!()
43
return
44
}
0 commit comments