From 70b44ca835e001b393605d7409f3400e3ca066ed Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 15 Nov 2024 10:37:24 +0800 Subject: [PATCH] chore(reactivity): remove unecessary array copy (#12400) --- packages/reactivity/src/effectScope.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/reactivity/src/effectScope.ts b/packages/reactivity/src/effectScope.ts index e045d30e89b..cb4e057c480 100644 --- a/packages/reactivity/src/effectScope.ts +++ b/packages/reactivity/src/effectScope.ts @@ -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