Skip to content
Snippets Groups Projects
Unverified Commit f300a400 authored by Yang Mingshan's avatar Yang Mingshan Committed by GitHub
Browse files

fix(watch): remove instance unmounted short circuit in getter of `watchEffect` (#9948)

parent 6de0c556
Branches
Tags
No related merge requests found
......@@ -5,7 +5,6 @@ import {
ReactiveEffect,
ReactiveFlags,
type Ref,
getCurrentScope,
isReactive,
isRef,
isShallow,
......@@ -220,8 +219,7 @@ function doWatch(
)
}
const instance =
getCurrentScope() === currentInstance?.scope ? currentInstance : null
const instance = currentInstance
const reactiveGetter = (source: object) =>
deep === true
? source // traverse will happen in wrapped getter below
......@@ -261,9 +259,6 @@ function doWatch(
} else {
// no cb -> simple effect
getter = () => {
if (instance && instance.isUnmounted) {
return
}
if (cleanup) {
cleanup()
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment