diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts index 99b064efaa5..f193c9f15a3 100644 --- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts +++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts @@ -15,7 +15,8 @@ import { TruncatableService } from '../../../../../truncatable/truncatable.servi import { DSONameService } from '../../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../../config/app-config.interface'; import { getFirstSucceededRemoteListPayload } from '../../../../../../core/shared/operators'; -import { map } from 'rxjs/operators'; +import { filter, map } from 'rxjs/operators'; +import { isNotEmpty } from '../../../../../empty.util'; @listableObjectComponent('PublicationSearchResult', ViewMode.ListElement) @listableObjectComponent(ItemSearchResult, ViewMode.ListElement) @@ -69,7 +70,9 @@ export class ItemSearchResultListElementComponent extends SearchResultListElemen this.klaroService.watchConsentUpdates(); this.hasLoadedThirdPartyMetrics$ = combineLatest([ - this.klaroService.consentsUpdates$, + this.klaroService.consentsUpdates$.pipe( + filter(consents => isNotEmpty(consents)) + ), this.dso.metrics?.pipe( getFirstSucceededRemoteListPayload(), map(metrics => {