Skip to content

Commit

Permalink
[FINNA-1318] Fix finna.layout.getOrganisationPageLink to filter null …
Browse files Browse the repository at this point in the history
…values.
  • Loading branch information
EreMaijala committed Nov 17, 2023
1 parent e70d225 commit 46a3f31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion themes/finna2/js/finna-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,9 @@ finna.layout = (function finnaLayout() {
}
$.ajax(params)
.done(function onGetOrganisationInfoDone(response) {
callback(response.data);
// Filter out null values:
const data = Object.fromEntries(Object.entries(response.data).filter((item) => null !== item[1]));
callback(data);
})
.fail(function onGetOrganisationInfoFail() {
callback(false);
Expand Down

0 comments on commit 46a3f31

Please sign in to comment.