chores: fix compilation

This commit is contained in:
Paulo Gustavo Veiga 2021-02-25 19:25:22 -08:00
parent b7b3ec1b6f
commit 4fa32d5073
2 changed files with 2 additions and 8 deletions

View File

@ -58,11 +58,8 @@ const DuplicateDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElem
const { map } = fetchMapById(mapId); const { map } = fetchMapById(mapId);
useEffect(() => { useEffect(() => {
if (open && map) { if (map) {
setModel(map); setModel(map);
} else {
setModel(defaultModel);
setError(undefined);
} }
}, [mapId]); }, [mapId]);

View File

@ -60,11 +60,8 @@ const RenameDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement
const { map } = fetchMapById(mapId); const { map } = fetchMapById(mapId);
useEffect(() => { useEffect(() => {
if (open && map) { if (map) {
setModel(map); setModel(map);
} else {
setModel(defaultModel);
setError(undefined);
} }
}, [mapId]); }, [mapId]);