From 9850be453a571db8841f7ac88940981a56ccc368 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 19 Feb 2021 17:44:02 +0800 Subject: [PATCH] fix: React state updated after component unmounted (#240) * fix: React state updated after component unmounted close https://github.com/ant-design/ant-design/issues/29328 * revert father version --- src/Popup/useVisibleStatus.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Popup/useVisibleStatus.ts b/src/Popup/useVisibleStatus.ts index b282fb28..2805ad5a 100644 --- a/src/Popup/useVisibleStatus.ts +++ b/src/Popup/useVisibleStatus.ts @@ -62,6 +62,7 @@ export default ( } if (status) { + cancelRaf(); rafRef.current = raf(async () => { const index = StatusQueue.indexOf(status); const nextStatus = StatusQueue[index + 1];