From ea6c064838a04dfc5496a56060b540d13d2555f9 Mon Sep 17 00:00:00 2001 From: daiwei Date: Thu, 10 Jul 2025 14:26:03 +0800 Subject: [PATCH] fix(reactivity): properly cleanup effectScope --- packages/reactivity/src/effect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 } } -- 2.47.2