Skip to content

Commit b9fb79a

Browse files
authored
fix(reactivity): allow collect effects in EffectScope (#13657)
close #13656
1 parent 3cb27d1 commit b9fb79a

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/reactivity/src/effectScope.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import { EffectFlags, cleanup } from './effect'
2-
import {
3-
type Link,
4-
type ReactiveNode,
5-
link,
6-
setActiveSub,
7-
unlink,
8-
} from './system'
2+
import { type Link, type ReactiveNode, link, unlink } from './system'
93
import { warn } from './warning'
104

115
export let activeEffectScope: EffectScope | undefined
@@ -65,14 +59,12 @@ export class EffectScope implements ReactiveNode {
6559
}
6660

6761
run<T>(fn: () => T): T | undefined {
68-
const prevSub = setActiveSub()
6962
const prevScope = activeEffectScope
7063
try {
7164
activeEffectScope = this
7265
return fn()
7366
} finally {
7467
activeEffectScope = prevScope
75-
setActiveSub(prevSub)
7668
}
7769
}
7870

0 commit comments

Comments
 (0)