Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
fix: fire checkNode on leading edge (#147)
Browse files Browse the repository at this point in the history
fixes issues with checking unmounted nodes
  • Loading branch information
JiaboHou committed Jun 16, 2020
1 parent 7ef4151 commit 055dc2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function checkNode(component: React.Component): void {
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function componentAfterRender(component: any): void {
const debounceCheckNode: Function = debounce(checkNode, timeout);
const debounceCheckNode: Function = debounce(checkNode, timeout, true);
after(component, 'componentDidMount', debounceCheckNode);
after(component, 'componentDidUpdate', debounceCheckNode);
}
Expand Down

0 comments on commit 055dc2b

Please sign in to comment.