From 240d518304a7841a299a6710356c089f161f8711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=81=A9?= Date: Wed, 1 Mar 2023 21:31:46 +0800 Subject: [PATCH] Fix autoScrollInterval leak --- packages/core/src/hooks/utilities/useAutoScroller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/hooks/utilities/useAutoScroller.ts b/packages/core/src/hooks/utilities/useAutoScroller.ts index 84bf266c..ca78df50 100644 --- a/packages/core/src/hooks/utilities/useAutoScroller.ts +++ b/packages/core/src/hooks/utilities/useAutoScroller.ts @@ -177,6 +177,8 @@ export function useAutoScroller({ JSON.stringify(threshold), ] ); + + useEffect(() => clearAutoScrollInterval, [clearAutoScrollInterval]); } interface ScrollIntent {