Skip to content

Commit

Permalink
Record view / fix javascript error when a metadata has multiple linea…
Browse files Browse the repository at this point in the history
…ge source descriptions

angular.js?v=2e31720b368df88f570059d390b081d82fe9cf75:15697 Error: [linky:notstring] Expected string but received: [...
  • Loading branch information
josegar74 committed Jan 14, 2025
1 parent 357b3d9 commit a8cea22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2023 Food and Agriculture Organization of the
* Copyright (C) 2001-2025 Food and Agriculture Organization of the
* United Nations (FAO-UN), United Nations World Food Programme (WFP)
* and United Nations Environment Programme (UNEP)
*
Expand Down Expand Up @@ -555,7 +555,7 @@ private void checkIndexResponse(BulkResponse bulkItemResponses,
.add("MD_SecurityConstraintsUseLimitation")
.add("MD_SecurityConstraintsUseLimitationObject")
.add("overview")
.add("sourceDescription")
.add("sourceDescriptionObject")
.add("MD_ConstraintsUseLimitation")
.add("MD_ConstraintsUseLimitationObject")
.add("resourceType")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ <h2 data-translate="">lineage</h2>
<p data-ng-bind-html="mdView.current.record.lineage | linky | newlines"></p>
</div>

<div data-ng-if="mdView.current.record.sourceDescription">
<div
data-ng-if="mdView.current.record.sourceDescription && mdView.current.record.sourceDescription.length > 0"
>
<h2 data-translate="">sourceDescription</h2>
<p data-ng-bind-html="mdView.current.record.sourceDescription | linky | newlines"></p>

<p
data-ng-repeat="d in mdView.current.record.sourceDescription track by $index"
data-ng-bind-html="d | linky | newlines"
></p>
</div>

<div data-ng-if="mdView.current.record.supplementalInformation">
Expand Down

0 comments on commit a8cea22

Please sign in to comment.