Fix login modal error

pull/4367/head
Chocobozzz 2021-08-30 17:13:16 +02:00
parent f2e31d589c
commit af6766e375
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 2 deletions

View File

@ -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(