Compare commits

...

1 Commits

Author SHA1 Message Date
Gerzon Z 92a727f059 fix: `login` method when changing server 2022-03-10 15:12:01 -03:00
1 changed files with 7 additions and 1 deletions

View File

@ -260,7 +260,13 @@ function stopListener(listener: any): boolean {
async function login(credentials: ICredentials, isFromWebView = false): Promise<ILoggedUser | undefined> {
// RC 0.64.0
if (sdk.current) {
await sdk.current.login(credentials);
} else {
const { server } = store.getState().server;
sdk.initialize(server);
await sdk.current.login(credentials);
}
const result = sdk.current.currentLogin?.result;
if (result) {
const user: ILoggedUser = {