Skip to content

Commit d109a5a

Browse files
artlowelgithub-actions[bot]
authored andcommitted
also skip loading hal requests
(cherry picked from commit c8ac260)
1 parent bd6c99d commit d109a5a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/app/core/shared/hal-endpoint.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { hasValue, isEmpty, isNotEmpty } from '../../shared/empty.util';
66
import { RESTURLCombiner } from '../url-combiner/rest-url-combiner';
77
import { Injectable } from '@angular/core';
88
import { EndpointMap } from '../cache/response.models';
9-
import { getFirstCompletedRemoteData } from './operators';
109
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
1110
import { RemoteData } from '../data/remote-data';
1211
import { CacheableObject } from '../cache/cacheable-object.model';
@@ -37,8 +36,8 @@ export class HALEndpointService {
3736
// This skip ensures that if a stale object is present in the cache when you do a
3837
// call it isn't immediately returned, but we wait until the remote data for the new request
3938
// is created.
40-
skipWhile((rd: RemoteData<CacheableObject>) => rd.isStale),
41-
getFirstCompletedRemoteData(),
39+
skipWhile((rd: RemoteData<CacheableObject>) => rd.isLoading || rd.isStale),
40+
take(1),
4241
map((response: RemoteData<CacheableObject>) => {
4342
if (hasValue(response.payload)) {
4443
return response.payload._links;

0 commit comments

Comments
 (0)