Merge pull request #2318 from bitwarden/Bug/AccountSwitching/LogoutAction

[bug] Clean state service on logout
This commit is contained in:
Addison Beck 2022-02-07 15:23:44 -05:00 committed by GitHub
commit 1d34339d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -571,6 +571,8 @@ export default class MainBackground {
this.keyConnectorService.clear(),
]);
await this.stateService.clean();
if (userId == null || userId === (await this.stateService.getUserId())) {
this.searchService.clearIndex();
this.messagingService.send("doneLoggingOut", { expired: expired, userId: userId });