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

@@ -5,7 +5,15 @@ import {
race as observableRace
} from 'rxjs';
import { Injectable } from '@angular/core';
import { distinctUntilChanged, first, flatMap, map, startWith, switchMap } from 'rxjs/operators';
import {
distinctUntilChanged,
first,
flatMap,
map,
startWith,
switchMap,
take
} from 'rxjs/operators';
import { hasValue, hasValueOperator, isEmpty, isNotEmpty } from '../../../shared/empty.util';
import { PaginatedList } from '../../data/paginated-list';
import { RemoteData } from '../../data/remote-data';
@@ -44,7 +52,7 @@ export class RemoteDataBuildService {
href$.pipe(getRequestFromRequestHref(this.requestService)),
requestUUID$.pipe(getRequestFromRequestUUID(this.requestService)),
).pipe(
first()
take(1)
);
// always use self link if that is cached, only if it isn't, get it via the response.