minimap: fix debounced zoom cleanup

This commit is contained in:
Danielv123 committed 2026-02-09 19:19:48 +01:00
1 parent 35575a93a3
commit 5ff7d7ee42
1 file changed
+3 -3
+3 -3
View File
@@ -1863,10 +1863,10 @@ export default function CanvasMinimapPage({
zoomLevel: getClosestZoomLevel(viewStateRef.current.zoomLevel),
});
// Cleanup throttled zoom update on unmount
// Cleanup debounced zoom update on unmount
return () => {
if (throttledZoomUpdate.current) {
clearTimeout(throttledZoomUpdate.current);
if (debouncedZoomUpdate.current) {
clearTimeout(debouncedZoomUpdate.current);
}
};
}, []);