fix: always make sure all data is loaded before loading context data #600

This commit is contained in:
Johannes Millan 2020-10-28 11:48:34 +01:00
parent c9a4e8270b
commit 10f1ea5a68

View file

@ -67,7 +67,8 @@ export class WorkContextService {
// CONTEXT LEVEL
// -------------
activeWorkContextId$: Observable<string | null> = this._store$.pipe(
activeWorkContextId$: Observable<string | null> = this._isAllDataLoaded$.pipe(
switchMap(() => this._store$),
select(selectActiveContextId),
distinctUntilChanged(),
shareReplay(1),
@ -77,7 +78,8 @@ export class WorkContextService {
activeWorkContextTypeAndId$: Observable<{
activeId: string;
activeType: WorkContextType;
}> = this._store$.pipe(
}> = this._isAllDataLoaded$.pipe(
switchMap(() => this._store$),
select(selectActiveContextTypeAndId),
distinctUntilChanged(distinctUntilChangedObject),
shareReplay(1),