Fix map state update in game

This commit is contained in:
Mitchell McCaffrey 2020-04-26 12:25:07 +10:00
parent d8f8fb6059
commit 049a8f5c00

View File

@ -49,11 +49,12 @@ function Game() {
if (
debouncedMapState &&
debouncedMapState.mapId &&
debouncedMapState.owner === userId
map &&
map.owner === userId
) {
db.table("states").update(debouncedMapState.mapId, debouncedMapState);
}
}, [debouncedMapState, userId]);
}, [map, debouncedMapState, userId]);
function handleMapChange(newMap, newMapState) {
setMapState(newMapState);