mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-29 08:47:13 +09:00
minimap: fix debounced zoom cleanup
This commit is contained in:
1 parent
35575a93a3
commit
5ff7d7ee42
1 file changed
+3
-3
@@ -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);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user