Skip to content
Snippets Groups Projects
Commit c1ba1246 authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Prevent error when a credit doesn't have a link

parent dccfecdd
No related branches found
No related tags found
1 merge request!53Version 2.3.2
Pipeline #1768 passed
......@@ -11,7 +11,7 @@
<div class="credit">
<div class="logo-content">
<a [href]="credit.links[0].url" target="_blank" *ngIf="credit.links[0]; else withoutLink">
<a [href]="credit.links[0].url" target="_blank" *ngIf="credit.links && credit.links[0]; else withoutLink">
<img [src]="credit.logo" [alt]="credit.name">
</a>
<ng-template #withoutLink>
......@@ -22,7 +22,8 @@
<p>{{credit.description}}</p>
<div class="bottom-section">
<a [href]="credit.links[0].url" i18n="@@credits.visitWebsite">Visit the website</a>
<a *ngIf="credit.links && credit.links[0]" [href]="credit.links[0].url" i18n="@@credits.visitWebsite">Visit
the website</a>
</div>
</div>
</div>
......
import { Component, OnInit } from '@angular/core';
import { OrganizationsService } from '../../services/organizations.service';
import { Organization, Credit } from '../../models';
import { ElasticsearchService, DatasetResearchService } from '../../../geosource/services';
import { Router } from '@angular/router';
import { Credit } from '../../models';
import { AppRoutes } from '../../../routes';
import { Aggregation } from '../../../geosource/models/filter.model';
import { scopesResearch } from '../../../geosource/models/scopes-research';
import { IPageHeaderInfo } from '../../../shared/models';
import { pageTitles, notificationMessages } from '../../../../i18n/traductions';
import { NotificationService } from '../../../core/services';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment