diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 0bcfbde147e..4760344c4af 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -217,6 +217,13 @@ function doWatch( recordEffect(runner) return () => { stop(runner) + if (instance) { + const effects = instance.effects! + const index = effects.indexOf(runner) + if (index > -1) { + effects.splice(index, 1) + } + } } }