]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(reactivity): remove unecessary array copy (#12400)
authoredison <daiwei521@126.com>
Fri, 15 Nov 2024 02:37:24 +0000 (10:37 +0800)
committerGitHub <noreply@github.com>
Fri, 15 Nov 2024 02:37:24 +0000 (10:37 +0800)
packages/reactivity/src/effectScope.ts

index e045d30e89b08cccdaae7b0bcaa3c6318389689e..cb4e057c480fcbee3b695142a1cdc46854c0af56 100644 (file)
@@ -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