From 72c6b99f5839f7ffc1ce27fb89d04dfed38245f5 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Fri, 17 Jan 2020 15:51:35 +0700 Subject: [PATCH] fixed dialog wrong appearance at disabled editor --- src/redux/editor/sagas.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/redux/editor/sagas.ts b/src/redux/editor/sagas.ts index e0c1ba7..d636770 100644 --- a/src/redux/editor/sagas.ts +++ b/src/redux/editor/sagas.ts @@ -1,6 +1,6 @@ import { call, put, takeEvery, takeLatest, select, race } from 'redux-saga/effects'; import { delay, SagaIterator } from 'redux-saga'; -import { selectEditor } from '~/redux/editor/selectors'; +import { selectEditor, selectEditorMode } from '~/redux/editor/selectors'; import { simplify } from '~/utils/simplify'; import { editorHideRenderer, @@ -177,6 +177,12 @@ function* locationChangeSaga({ location }: ReturnType = yield select(selectEditorMode); + + if (mode !== MODES.NONE) { + yield put(editorSetMode(MODES.NONE)); + } + yield call(loadMapFromPath); MainMap.fitVisibleBounds({ animate: true }); }