diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx index 88496bff..4c44b677 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx @@ -58,11 +58,8 @@ const DuplicateDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElem const { map } = fetchMapById(mapId); useEffect(() => { - if (open && map) { + if (map) { setModel(map); - } else { - setModel(defaultModel); - setError(undefined); } }, [mapId]); diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx index 4e612ef8..ec630878 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx @@ -60,11 +60,8 @@ const RenameDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement const { map } = fetchMapById(mapId); useEffect(() => { - if (open && map) { + if (map) { setModel(map); - } else { - setModel(defaultModel); - setError(undefined); } }, [mapId]);