From dd9fc1881f79cd6c609e640eec44f509c1ad8ff3 Mon Sep 17 00:00:00 2001 From: frabacche Date: Tue, 5 Mar 2024 16:13:00 +0100 Subject: [PATCH] fix 'undefined' error on anonymous item page landing --- src/app/item-page/simple/item-page.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/item-page/simple/item-page.component.ts b/src/app/item-page/simple/item-page.component.ts index a057e99715a..0806bc921dd 100644 --- a/src/app/item-page/simple/item-page.component.ts +++ b/src/app/item-page/simple/item-page.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Inject, OnDestroy, OnInit, PLATFORM import { ActivatedRoute, Router } from '@angular/router'; import { isPlatformServer } from '@angular/common'; -import { Observable, combineLatest } from 'rxjs'; +import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap, take } from 'rxjs/operators'; import { ItemDataService } from '../../core/data/item-data.service'; @@ -155,6 +155,8 @@ export class ItemPageComponent implements OnInit, OnDestroy { switchMap((coarLdnEnabled: boolean) => { if (coarLdnEnabled) { return this.notifyInfoService.getCoarLdnLocalInboxUrls(); + } else { + return of([]); } }) );