1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

Fix logging out of all accounts instead of one (#1231)

When logOut is triggered and the userId is not provided. Retrieve currentUserId
This commit is contained in:
Daniel James Smith
2022-01-13 15:43:00 +01:00
committed by GitHub
parent 7818ffc2fb
commit abede3e5af

View File

@@ -434,6 +434,10 @@ export class AppComponent implements OnInit {
} }
private async logOut(expired: boolean, userId?: string) { private async logOut(expired: boolean, userId?: string) {
if (!userId) {
userId = await this.stateService.getUserId();
}
await Promise.all([ await Promise.all([
this.eventService.uploadEvents(userId), this.eventService.uploadEvents(userId),
this.syncService.setLastSync(new Date(0), userId), this.syncService.setLastSync(new Date(0), userId),