From af6766e3756c14e0ed0b1e1ea6470726f0e3a3f1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Aug 2021 17:13:16 +0200 Subject: Fix login modal error --- client/src/app/app.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 86b687173..95af89b19 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,5 +1,5 @@ import { Hotkey, HotkeysService } from 'angular2-hotkeys' -import { forkJoin } from 'rxjs' +import { forkJoin, delay } from 'rxjs' import { filter, first, map } from 'rxjs/operators' import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' @@ -223,7 +223,10 @@ export class AppComponent implements OnInit, AfterViewInit { private openModalsIfNeeded () { const userSub = this.authService.userInformationLoaded - .pipe(map(() => this.authService.getUser())) + .pipe( + delay(0), // Wait for modals creations + map(() => this.authService.getUser()) + ) // Admin modal userSub.pipe( -- cgit v1.2.3