Skip to content

Commit 3a89cf7

Browse files
committed
fix(reactivity): use forEach instead
improve code improve code
1 parent 4a3237a commit 3a89cf7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/reactivity/src/effectScope.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ export class EffectScope {
7676

7777
stop(fromParent?: boolean) {
7878
if (this.active) {
79+
this.effects.forEach(e => e.stop())
7980
let i, l
80-
for (i = 0, l = this.effects.length; i < l; i++) {
81-
this.effects[i].stop()
82-
}
8381
for (i = 0, l = this.cleanups.length; i < l; i++) {
8482
this.cleanups[i]()
8583
}

0 commit comments

Comments
 (0)