From abede3e5af02369ab69844e32cd55cc6898716d7 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Thu, 13 Jan 2022 15:43:00 +0100 Subject: [PATCH] Fix logging out of all accounts instead of one (#1231) When logOut is triggered and the userId is not provided. Retrieve currentUserId --- src/app/app.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index bedab39c..3c4ba213 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -434,6 +434,10 @@ export class AppComponent implements OnInit { } private async logOut(expired: boolean, userId?: string) { + if (!userId) { + userId = await this.stateService.getUserId(); + } + await Promise.all([ this.eventService.uploadEvents(userId), this.syncService.setLastSync(new Date(0), userId),