[FIX] Unnecessary login dispatch on adding new server (#3693)

This commit is contained in:
Danish Ahmed Mirza 2022-02-08 17:37:10 +05:30 committed by GitHub
parent 6839a6e548
commit 38be5ce54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -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));
} }