diff --git a/src/containers/dialogs/EditorDialog/index.tsx b/src/containers/dialogs/EditorDialog/index.tsx index f173207c..8de9fa8e 100644 --- a/src/containers/dialogs/EditorDialog/index.tsx +++ b/src/containers/dialogs/EditorDialog/index.tsx @@ -27,7 +27,7 @@ const EditorDialog: FC = ({ node, onRequestClose }) => { const component = useMemo(() => node.type && prop(node.type, NODE_EDITORS), [node.type]); const onClose = useCallback(() => { - if (!window.confirm('Точно выйти?')) { + if (dirty && !window.confirm('Точно выйти?')) { return undefined; }