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 ddba601 commit 57af99bCopy full SHA for 57af99b
packages/runtime-core/src/apiWatch.ts
@@ -378,18 +378,18 @@ function doWatch(
378
379
const effect = new ReactiveEffect(getter, scheduler)
380
381
+ if (__DEV__) {
382
+ effect.onTrack = onTrack
383
+ effect.onTrigger = onTrigger
384
+ }
385
+
386
const unwatch = () => {
387
effect.stop()
388
if (instance && instance.scope) {
389
remove(instance.scope.effects!, effect)
390
}
391
392
- if (__DEV__) {
- effect.onTrack = onTrack
- effect.onTrigger = onTrigger
- }
-
393
// initial run
394
if (cb) {
395
if (immediate) {
0 commit comments