Skip to content

Commit 5ca96ce

Browse files
author
Andrea Barbasso
committed
[DSC-2768] fix (hopefully, again) test failing on pipelines only
1 parent c228c9d commit 5ca96ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
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) {
117+
if (this.showMetrics && this.klaroService && this.klaroService.watchConsentUpdates instanceof Function) {
118118
this.klaroService.watchConsentUpdates();
119119

120120
this.hasLoadedThirdPartyMetrics$ = combineLatest([
@@ -128,7 +128,7 @@ export class ItemSearchResultListElementComponent extends SearchResultListElemen
128128
}),
129129
),
130130
]).pipe(
131-
map(([consents, metrics]) => {
131+
map(([consents, metrics = []]) => {
132132
return metrics.reduce((previous, current) => {
133133
return consents[current.metricType] && previous;
134134
}, true);

0 commit comments

Comments
 (0)