fixed undetected console log

This commit is contained in:
Fedor Katurov 2019-12-30 11:01:47 +07:00
parent 570efa661d
commit f814fe6c42
3 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,4 @@
import { REHYDRATE } from "redux-persist";
import { REHYDRATE, RehydrateAction } from "redux-persist";
import { delay, SagaIterator } from "redux-saga";
import {
takeLatest,
@ -253,7 +253,9 @@ function* mapInitSaga() {
return true;
}
function* authCheckSaga() {
function* authCheckSaga({ key }: RehydrateAction) {
if (key !== 'user') return;
pushLoaderState(70);
const { id, token } = yield select(getUser);
@ -291,6 +293,7 @@ function* authCheckSaga() {
return yield call(mapInitSaga);
} else if (!ready) {
pushNetworkInitError();
return;
}
}