Merge branch 'w2p-122357_prevent-request-urls-from-being-fired-multiple-times-7.4' into dspace-8_x

This commit is contained in:
Alexandre Vryghem
2025-01-29 00:22:35 +01:00

View File

@@ -11,6 +11,7 @@ import {
from as observableFrom, from as observableFrom,
Observable, Observable,
of as observableOf, of as observableOf,
shareReplay,
} from 'rxjs'; } from 'rxjs';
import { import {
map, map,
@@ -283,6 +284,10 @@ export class BaseDataService<T extends CacheableObject> implements HALDataServic
isNotEmptyOperator(), isNotEmptyOperator(),
take(1), take(1),
map((href: string) => this.buildHrefFromFindOptions(href, {}, [], ...linksToFollow)), map((href: string) => this.buildHrefFromFindOptions(href, {}, [], ...linksToFollow)),
shareReplay({
bufferSize: 1,
refCount: true,
}),
); );
const startTime: number = new Date().getTime(); const startTime: number = new Date().getTime();
@@ -337,6 +342,10 @@ export class BaseDataService<T extends CacheableObject> implements HALDataServic
isNotEmptyOperator(), isNotEmptyOperator(),
take(1), take(1),
map((href: string) => this.buildHrefFromFindOptions(href, options, [], ...linksToFollow)), map((href: string) => this.buildHrefFromFindOptions(href, options, [], ...linksToFollow)),
shareReplay({
bufferSize: 1,
refCount: true,
}),
); );
const startTime: number = new Date().getTime(); const startTime: number = new Date().getTime();