diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 0c13e72988f..7439acee543 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -5,7 +5,6 @@ import { ReactiveEffect, ReactiveFlags, type Ref, - getCurrentScope, isReactive, isRef, isShallow, @@ -220,9 +219,7 @@ function doWatch( ) } - const instance = - getCurrentScope() === currentInstance?.scope ? currentInstance : null - // const instance = currentInstance + const instance = currentInstance let getter: () => any let forceTrigger = false let isMultiSource = false @@ -259,9 +256,6 @@ function doWatch( } else { // no cb -> simple effect getter = () => { - if (instance && instance.isUnmounted) { - return - } if (cleanup) { cleanup() }