fix: cleanup of render debug

This commit is contained in:
Nate 2025-09-15 20:11:48 -07:00
parent 931afc63aa
commit da2e31694a

View file

@ -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;