Skip to content

Commit

Permalink
Merge branch 'main' into chore/security-ws
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnickii authored Jul 9, 2024
2 parents b18fb95 + 62b1ed4 commit c711c76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mgt-components/src/components/mgt-login/mgt-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ export class MgtLogin extends MgtTemplatedTaskComponent {

const provider = Providers.globalProvider;
if (provider?.logout) {
const activeAccount = provider.getActiveAccount();
await provider.logout();
this.userDetails = null;
if (provider.isMultiAccountSupportedAndEnabled) {
const activeAccount = provider.getActiveAccount();
localStorage.removeItem(activeAccount?.id + this._userDetailsKey);
}
this.hideFlyout();
Expand Down Expand Up @@ -726,7 +726,7 @@ export class MgtLogin extends MgtTemplatedTaskComponent {
* @memberof MgtLogin
*/
private readonly onClick = (): void => {
if (this.userDetails && this._isFlyoutOpen) {
if (this.userDetails && this.flyout.isOpen) {
this.hideFlyout();
} else if (this.userDetails) {
this.showFlyout();
Expand Down

0 comments on commit c711c76

Please sign in to comment.