Don't update the state when action.reload === false
This commit is contained in:
parent
09cbcf6145
commit
15d61a98e7
1 changed files with 5 additions and 3 deletions
|
@ -167,11 +167,13 @@ export default function auth(oldState = initialState, action) {
|
|||
// Persist the state in localStorage
|
||||
persistAuth(state);
|
||||
|
||||
// Persist the session
|
||||
if (action.reload !== false) {
|
||||
persistSession(state);
|
||||
if (action.reload === false) {
|
||||
return oldState;
|
||||
}
|
||||
|
||||
// Persist the session
|
||||
persistSession(state);
|
||||
|
||||
// Reload the page under some conditions
|
||||
maybeReload(oldState, state, action);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue