diff --git a/src/redux/auth/sagas.ts b/src/redux/auth/sagas.ts index 2f75616c..9664e4ea 100644 --- a/src/redux/auth/sagas.ts +++ b/src/redux/auth/sagas.ts @@ -39,6 +39,7 @@ import { selectAuthUser, selectAuthUpdates, selectAuthRestore, + selectAuth, } from './selectors'; import { IResultWithStatus, INotification, IMessageNotification, Unwrap } from '../types'; import { IUser, IAuthState } from './types'; @@ -83,6 +84,10 @@ function* sendLoginRequestSaga({ username, password }: ReturnType = yield select(selectAuth); + + if (!token) return; + const { error, data: { user },