Fix login modal error
This commit is contained in:
parent
f2e31d589c
commit
af6766e375
|
@ -1,5 +1,5 @@
|
||||||
import { Hotkey, HotkeysService } from 'angular2-hotkeys'
|
import { Hotkey, HotkeysService } from 'angular2-hotkeys'
|
||||||
import { forkJoin } from 'rxjs'
|
import { forkJoin, delay } from 'rxjs'
|
||||||
import { filter, first, map } from 'rxjs/operators'
|
import { filter, first, map } from 'rxjs/operators'
|
||||||
import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common'
|
import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common'
|
||||||
import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core'
|
import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core'
|
||||||
|
@ -223,7 +223,10 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||||
|
|
||||||
private openModalsIfNeeded () {
|
private openModalsIfNeeded () {
|
||||||
const userSub = this.authService.userInformationLoaded
|
const userSub = this.authService.userInformationLoaded
|
||||||
.pipe(map(() => this.authService.getUser()))
|
.pipe(
|
||||||
|
delay(0), // Wait for modals creations
|
||||||
|
map(() => this.authService.getUser())
|
||||||
|
)
|
||||||
|
|
||||||
// Admin modal
|
// Admin modal
|
||||||
userSub.pipe(
|
userSub.pipe(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user