[FIX] Unnecessary login dispatch on adding new server (#3693)
This commit is contained in:
parent
6839a6e548
commit
38be5ce54f
|
@ -263,7 +263,6 @@ const RocketChat = {
|
||||||
}
|
}
|
||||||
reduxStore.dispatch(connectSuccess());
|
reduxStore.dispatch(connectSuccess());
|
||||||
const { server: currentServer } = reduxStore.getState().server;
|
const { server: currentServer } = reduxStore.getState().server;
|
||||||
const { user } = reduxStore.getState().login;
|
|
||||||
if (user?.token && server === currentServer) {
|
if (user?.token && server === currentServer) {
|
||||||
reduxStore.dispatch(loginRequest({ resume: user.token }, logoutOnError));
|
reduxStore.dispatch(loginRequest({ resume: user.token }, logoutOnError));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue