Send a map clear before replace to ensure new state isn't show on old image
This commit is contained in:
@@ -141,7 +141,7 @@ function SelectMapModal({
|
||||
});
|
||||
// Removed the map from the map screen if needed
|
||||
if (currentMap && currentMap.id === selectedMap.id) {
|
||||
onMapChange(null);
|
||||
onMapChange(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,8 +165,7 @@ function SelectMapModal({
|
||||
if (selectedMap) {
|
||||
let currentMapState =
|
||||
(await db.table("states").get(selectedMap.id)) || defaultMapState;
|
||||
onMapStateChange(currentMapState);
|
||||
onMapChange(selectedMap);
|
||||
onMapChange(selectedMap, currentMapState);
|
||||
onDone();
|
||||
}
|
||||
onDone();
|
||||
|
||||
Reference in New Issue
Block a user