From: daiwei Date: Thu, 10 Jul 2025 06:26:03 +0000 (+0800) Subject: fix(reactivity): properly cleanup effectScope X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea6c064838a04dfc5496a56060b540d13d2555f9;p=thirdparty%2Fvuejs%2Fcore.git fix(reactivity): properly cleanup effectScope --- diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index af8ebea89a..65cd1c934e 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -271,12 +271,12 @@ export function resetTracking(): void { export function cleanup( sub: ReactiveNode & { cleanups: (() => void)[]; cleanupsLength: number }, ): void { - const l = sub.cleanupsLength + const l = sub.cleanups.length if (l) { for (let i = 0; i < l; i++) { sub.cleanups[i]() } - sub.cleanupsLength = 0 + sub.cleanups.length = sub.cleanupsLength = 0 } }