diff --git a/src/app/layout/account-switcher.component.ts b/src/app/layout/account-switcher.component.ts index 7526c7e8..c650a7d3 100644 --- a/src/app/layout/account-switcher.component.ts +++ b/src/app/layout/account-switcher.component.ts @@ -89,8 +89,12 @@ export class AccountSwitcherComponent implements OnInit { } async switch(userId: string) { - this.messagingService.send("switchAccount", { userId: userId }); this.toggle(); + + if (userId === (await this.stateService.getUserId())) { + return; + } + this.messagingService.send("switchAccount", { userId: userId }); } private async createSwitcherAccounts(baseAccounts: {