fixed repeating map requests

This commit is contained in:
Fedor Katurov 2020-01-10 12:30:32 +07:00
parent 9760002fad
commit 65885acb75

View file

@ -118,16 +118,14 @@ export function* loadMapFromPath() {
const map = yield call(loadMapSaga, path); const map = yield call(loadMapSaga, path);
if (!map) { if (!map) {
yield call(setReadySaga); yield call(startEmptyEditorSaga);
return yield call(startEmptyEditorSaga); return
} }
yield put(editorSetEditing(mode && mode === 'edit')); yield put(editorSetEditing(mode && mode === 'edit'));
yield call(setReadySaga);
return; return;
} }
yield call(setReadySaga);
yield call(startEmptyEditorSaga); yield call(startEmptyEditorSaga);
} }
@ -153,6 +151,7 @@ export function* mapInitSaga() {
} }
yield call(loadMapFromPath); yield call(loadMapFromPath);
yield call(setReadySaga);
pushLoaderState(100); pushLoaderState(100);
} }