Added a clear map call to map changes
This commit is contained in:
parent
30a1319298
commit
abd5f12269
@ -174,6 +174,10 @@ function NetworkedMapAndTokens({ session }) {
|
|||||||
}, [currentMap, debouncedMapState, userId, database]);
|
}, [currentMap, debouncedMapState, userId, database]);
|
||||||
|
|
||||||
function handleMapChange(newMap, newMapState) {
|
function handleMapChange(newMap, newMapState) {
|
||||||
|
// Clear map before sending new one
|
||||||
|
setCurrentMap(null);
|
||||||
|
session.socket?.emit("map", null);
|
||||||
|
|
||||||
setCurrentMapState(newMapState, true, true);
|
setCurrentMapState(newMapState, true, true);
|
||||||
setCurrentMap(newMap);
|
setCurrentMap(newMap);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user