Fix map state update in game
This commit is contained in:
parent
d8f8fb6059
commit
049a8f5c00
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user