Thanks to visit codestin.com Credit goes to github.com
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.
watchEffect
1 parent 6de0c55 commit f300a40Copy full SHA for f300a40
‎packages/runtime-core/src/apiWatch.ts‎
@@ -5,7 +5,6 @@ import {
5
ReactiveEffect,
6
ReactiveFlags,
7
type Ref,
8
- getCurrentScope,
9
isReactive,
10
isRef,
11
isShallow,
@@ -220,8 +219,7 @@ function doWatch(
220
219
)
221
}
222
223
- const instance =
224
- getCurrentScope() === currentInstance?.scope ? currentInstance : null
+ const instance = currentInstance
225
const reactiveGetter = (source: object) =>
226
deep === true
227
? source // traverse will happen in wrapped getter below
@@ -261,9 +259,6 @@ function doWatch(
261
259
} else {
262
260
// no cb -> simple effect
263
getter = () => {
264
- if (instance && instance.isUnmounted) {
265
- return
266
- }
267
if (cleanup) {
268
cleanup()
269
0 commit comments