mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge pull request #2856 from 4Science/coar-notify-itempage-error-on-ldnenabled-false
fix 'undefined' error on anonymous item page landing
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="col-12">
|
||||
<h1 class="border-bottom">{{'item.edit.head' | translate}}</h1>
|
||||
<div class="pt-2">
|
||||
<ul class="nav nav-tabs justify-content-start" role="tablist">
|
||||
<ul *ngIf="pages.length > 0" class="nav nav-tabs justify-content-start" role="tablist">
|
||||
<li *ngFor="let page of pages" class="nav-item" role="presentation">
|
||||
<a *ngIf="(page.enabled | async)"
|
||||
[attr.aria-selected]="page.page === currentPage"
|
||||
|
@@ -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([]);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
Reference in New Issue
Block a user