mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
cancel editing loses is_public
This commit is contained in:
parent
8391408bb3
commit
679c485b89
4 changed files with 8 additions and 7 deletions
|
@ -400,7 +400,7 @@ function* changeProviderSaga({ provider }: ReturnType<typeof ActionCreators.chan
|
|||
}
|
||||
|
||||
function* locationChangeSaga({ location }: ReturnType<typeof ActionCreators.locationChanged>) {
|
||||
const { address, ready, user: { id, random_url } } = yield select(getState);
|
||||
const { address, ready, user: { id, random_url }, is_public } = yield select(getState);
|
||||
|
||||
if (!ready) return;
|
||||
|
||||
|
@ -410,11 +410,9 @@ function* locationChangeSaga({ location }: ReturnType<typeof ActionCreators.loca
|
|||
const map = yield call(loadMapSaga, path);
|
||||
|
||||
if (map && map.owner && mode === 'edit' && map.owner.id !== id) {
|
||||
// pushPath(`/${map.random_url}/edit`);
|
||||
return yield call(replaceAddressIfItsBusy, map.random_url, map.address);
|
||||
}
|
||||
} else if (mode === 'edit' && editor.owner.id !== id) {
|
||||
// pushPath(`/${random_url}/edit`);
|
||||
return yield call(replaceAddressIfItsBusy, random_url, address);
|
||||
} else {
|
||||
yield put(setAddressOrigin(''));
|
||||
|
@ -553,9 +551,7 @@ function* setUserSaga() {
|
|||
}
|
||||
|
||||
function* setTitleSaga({ title }: ReturnType<typeof ActionCreators.setTitle>):SagaIterator {
|
||||
if (title) {
|
||||
document.title = `${title} | Редактор маршрутов`;
|
||||
}
|
||||
if (title) { document.title = `${title} | Редактор маршрутов`; }
|
||||
}
|
||||
|
||||
export function* userSaga() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue