diff options
-rw-r--r-- | client/src/app/app.component.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 1724bbd1a..f1658ca1b 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -4,7 +4,7 @@ import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular | |||
4 | import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' | 4 | import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' |
5 | import { is18nPath } from '../../../shared/models/i18n' | 5 | import { is18nPath } from '../../../shared/models/i18n' |
6 | import { ScreenService } from '@app/shared/misc/screen.service' | 6 | import { ScreenService } from '@app/shared/misc/screen.service' |
7 | import { debounceTime, filter, map, pairwise, skip, switchMap } from 'rxjs/operators' | 7 | import { debounceTime, filter, first, map, pairwise, skip, switchMap } from 'rxjs/operators' |
8 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 8 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | 9 | import { I18n } from '@ngx-translate/i18n-polyfill' |
10 | import { fromEvent } from 'rxjs' | 10 | import { fromEvent } from 'rxjs' |
@@ -234,6 +234,7 @@ export class AppComponent implements OnInit { | |||
234 | private async openModalsIfNeeded () { | 234 | private async openModalsIfNeeded () { |
235 | this.serverService.configLoaded | 235 | this.serverService.configLoaded |
236 | .pipe( | 236 | .pipe( |
237 | first(), | ||
237 | switchMap(() => this.authService.userInformationLoaded), | 238 | switchMap(() => this.authService.userInformationLoaded), |
238 | map(() => this.authService.getUser()), | 239 | map(() => this.authService.getUser()), |
239 | filter(user => user.role === UserRole.ADMINISTRATOR) | 240 | filter(user => user.role === UserRole.ADMINISTRATOR) |