Skip to content

Commit f277584

Browse files
author
Andrea Barbasso
committed
[DSC-2860] fix potentially empty stream
1 parent a35c87c commit f277584

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class ItemSearchResultListElementComponent extends SearchResultListElemen
114114
* Check if item has Third-party metrics blocked by consents
115115
*/
116116
ngAfterViewInit() {
117-
if (this.showMetrics && this.klaroService && this.klaroService.watchConsentUpdates instanceof Function) {
117+
if (this.showMetrics && this.klaroService && this.klaroService.watchConsentUpdates instanceof Function && isNotEmpty(this.dso?.metrics)) {
118118
this.klaroService.watchConsentUpdates();
119119

120120
this.hasLoadedThirdPartyMetrics$ = combineLatest([

0 commit comments

Comments
 (0)