remove all instances of first as it can cause an error if it's never triggered

This commit is contained in:
Art Lowel
2018-12-19 14:53:11 +01:00
parent e2a6db3679
commit 9911578bcc
12 changed files with 44 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
import { distinctUntilChanged, filter, first, map, mergeMap, } from 'rxjs/operators';
import { distinctUntilChanged, filter, first, map, mergeMap, take, } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { MemoizedSelector, select, Store } from '@ngrx/store';
import { IndexName } from '../index/index.reducer';
@@ -165,7 +165,7 @@ export class ObjectCacheService {
this.store.pipe(
select(selfLinkFromUuidSelector(uuid)),
first()
take(1)
).subscribe((selfLink: string) => result = this.hasBySelfLink(selfLink));
return result;
@@ -184,7 +184,7 @@ export class ObjectCacheService {
let result = false;
this.store.pipe(select(entryFromSelfLinkSelector(selfLink)),
first()
take(1)
).subscribe((entry: ObjectCacheEntry) => result = this.isValid(entry));
return result;