fix: cleanup of render debug
This commit is contained in:
parent
931afc63aa
commit
da2e31694a
1 changed files with 5 additions and 1 deletions
|
|
@ -40,7 +40,11 @@ export function useRenderDebug(options?: {
|
|||
() => el.classList.remove(flashClassName),
|
||||
flashDurationMs,
|
||||
);
|
||||
return () => clearTimeout(t);
|
||||
return () => {
|
||||
clearTimeout(t);
|
||||
// Ensure we don't leave the flash class applied on cleanup
|
||||
el.classList.remove(flashClassName);
|
||||
};
|
||||
});
|
||||
|
||||
return { ref, count: countRef.current, countRef } as const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue