diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 3b236931..ffb06c1d 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -483,7 +483,7 @@
Powered by OpenAIRE Open Research Graph - + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index 4f8f755d..15f6b5cd 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -154,13 +154,15 @@ export class DataProviderComponent { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; - this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { - if(lastIndexUpdate) { - this.indexUpdateDate = new Date(lastIndexUpdate); - } else if(this.properties.lastIndexUpdate) { - this.indexUpdateDate = new Date(this.properties.lastIndexUpdate); - } - }); + if (typeof document !== 'undefined') { + this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { + if (lastIndexUpdate) { + this.indexUpdateDate = new Date(lastIndexUpdate); + } else if (this.properties.lastIndexUpdate) { + this.indexUpdateDate = new Date(this.properties.lastIndexUpdate); + } + }); + } //this.getDivContents(); this.getPageContents(); this.updateUrl(data.envSpecific.baseLink + this._router.url); @@ -252,7 +254,9 @@ export class DataProviderComponent { } else { this.aggregationStatusIsInitialized = true; } - this.initTabs(); + if (typeof document !== 'undefined') { + this.initTabs(); + } this.showTabs = true; this.updateTitle(this.dataProviderInfo.title.name); this.updateDescription("Content provider, " + this.dataProviderInfo.title.name); diff --git a/landingPages/landing-utils/metrics/metrics.component.ts b/landingPages/landing-utils/metrics/metrics.component.ts index 4d20ddbc..921e8123 100644 --- a/landingPages/landing-utils/metrics/metrics.component.ts +++ b/landingPages/landing-utils/metrics/metrics.component.ts @@ -45,14 +45,16 @@ import {animate, state, style, transition, trigger} from "@angular/animations"; class="charts uk-visible-toggle" tabindex="-1" uk-slider>