kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Don't update the state when action.reload === false
rodzic
09cbcf6145
commit
15d61a98e7
|
@ -167,11 +167,13 @@ export default function auth(oldState = initialState, action) {
|
||||||
// Persist the state in localStorage
|
// Persist the state in localStorage
|
||||||
persistAuth(state);
|
persistAuth(state);
|
||||||
|
|
||||||
// Persist the session
|
if (action.reload === false) {
|
||||||
if (action.reload !== false) {
|
return oldState;
|
||||||
persistSession(state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Persist the session
|
||||||
|
persistSession(state);
|
||||||
|
|
||||||
// Reload the page under some conditions
|
// Reload the page under some conditions
|
||||||
maybeReload(oldState, state, action);
|
maybeReload(oldState, state, action);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue