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) {
|
async function handleMapRemove(id) {
|
||||||
await removeMap(id);
|
await removeMap(id);
|
||||||
setSelectedMapId(null);
|
setSelectedMapId(null);
|
||||||
|
setMapSettingChanges({});
|
||||||
|
setMapStateSettingChanges({});
|
||||||
// Removed the map from the map screen if needed
|
// Removed the map from the map screen if needed
|
||||||
if (currentMap && currentMap.id === selectedMapId) {
|
if (currentMap && currentMap.id === selectedMapId) {
|
||||||
onMapChange(null, null);
|
onMapChange(null, null);
|
||||||
|
@ -96,6 +96,7 @@ function SelectTokensModal({ isOpen, onRequestClose }) {
|
|||||||
async function handleTokenRemove(id) {
|
async function handleTokenRemove(id) {
|
||||||
await removeToken(id);
|
await removeToken(id);
|
||||||
setSelectedTokenId(null);
|
setSelectedTokenId(null);
|
||||||
|
setTokenSettingChanges({});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user