Skip to content

Commit

Permalink
fix: React state updated after component unmounted (#240)
Browse files Browse the repository at this point in the history
* fix: React state updated after component unmounted

close ant-design/ant-design#29328

* revert father version
  • Loading branch information
afc163 authored Feb 19, 2021
1 parent ec9ad5a commit 9850be4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Popup/useVisibleStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default (
}

if (status) {
cancelRaf();
rafRef.current = raf(async () => {
const index = StatusQueue.indexOf(status);
const nextStatus = StatusQueue[index + 1];
Expand Down

0 comments on commit 9850be4

Please sign in to comment.