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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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),