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 8f85b6d commit 735da8aCopy full SHA for 735da8a
packages/runtime-core/src/apiWatch.ts
@@ -220,9 +220,8 @@ function doWatch(
220
)
221
}
222
223
- const instance =
224
- getCurrentScope() === currentInstance?.scope ? currentInstance : null
225
- // const instance = currentInstance
+ const scope = getCurrentScope()
+ const instance = currentInstance
226
let getter: () => any
227
let forceTrigger = false
228
let isMultiSource = false
@@ -259,7 +258,7 @@ function doWatch(
259
258
} else {
260
// no cb -> simple effect
261
getter = () => {
262
- if (instance && instance.isUnmounted) {
+ if (scope && !scope.active) {
263
return
264
265
if (cleanup) {
0 commit comments