diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-30 17:13:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-30 17:13:16 +0200 |
commit | af6766e3756c14e0ed0b1e1ea6470726f0e3a3f1 (patch) | |
tree | 9f643033b5ff270a4aa0e034c38290a5774bbd4e /client/src | |
parent | f2e31d589c900c0c79e74b8eb29a98384d9e6fc0 (diff) | |
download | PeerTube-af6766e3756c14e0ed0b1e1ea6470726f0e3a3f1.tar.gz PeerTube-af6766e3756c14e0ed0b1e1ea6470726f0e3a3f1.tar.zst PeerTube-af6766e3756c14e0ed0b1e1ea6470726f0e3a3f1.zip |
Fix login modal error
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/app.component.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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 @@ | |||
1 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 1 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
2 | import { forkJoin } from 'rxjs' | 2 | import { forkJoin, delay } from 'rxjs' |
3 | import { filter, first, map } from 'rxjs/operators' | 3 | import { filter, first, map } from 'rxjs/operators' |
4 | import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' | 4 | import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' |
5 | import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' | 5 | import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' |
@@ -223,7 +223,10 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
223 | 223 | ||
224 | private openModalsIfNeeded () { | 224 | private openModalsIfNeeded () { |
225 | const userSub = this.authService.userInformationLoaded | 225 | const userSub = this.authService.userInformationLoaded |
226 | .pipe(map(() => this.authService.getUser())) | 226 | .pipe( |
227 | delay(0), // Wait for modals creations | ||
228 | map(() => this.authService.getUser()) | ||
229 | ) | ||
227 | 230 | ||
228 | // Admin modal | 231 | // Admin modal |
229 | userSub.pipe( | 232 | userSub.pipe( |