Skip to content

Commit

Permalink
chore(reactivity): remove unecessary array copy (#12400)
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 authored Nov 15, 2024
1 parent a49858f commit 70b44ca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/reactivity/src/effectScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ export class EffectScope {
if (this._active) {
this._active = false
let i, l
const effects = this.effects.slice()
for (i = 0, l = effects.length; i < l; i++) {
effects[i].stop()
for (i = 0, l = this.effects.length; i < l; i++) {
this.effects[i].stop()
}
this.effects.length = 0

Expand Down

0 comments on commit 70b44ca

Please sign in to comment.