Fix bug with map settings changes getting carried over on delete
This commit is contained in:
parent
4942fd832f
commit
a8c670359c
@ -142,6 +142,8 @@ function SelectMapModal({
|
||||
async function handleMapRemove(id) {
|
||||
await removeMap(id);
|
||||
setSelectedMapId(null);
|
||||
setMapSettingChanges({});
|
||||
setMapStateSettingChanges({});
|
||||
// Removed the map from the map screen if needed
|
||||
if (currentMap && currentMap.id === selectedMapId) {
|
||||
onMapChange(null, null);
|
||||
|
@ -96,6 +96,7 @@ function SelectTokensModal({ isOpen, onRequestClose }) {
|
||||
async function handleTokenRemove(id) {
|
||||
await removeToken(id);
|
||||
setSelectedTokenId(null);
|
||||
setTokenSettingChanges({});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user