Skip to content

Commit

Permalink
Ensure labels is always a list in NAME_LOOKUP, #10552
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Jan 30, 2024
1 parent d39a0ba commit 67653ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arches/app/media/js/viewmodels/reference-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define([
this.selectionValue.subscribe(val => {
if (val) {
const tileReady = val.map(uri => {
const prefLabels = NAME_LOOKUP[uri].labels.reduce((keyObj, valObj) => (keyObj[valObj.language] = valObj.value, keyObj) ,{});
const prefLabels = NAME_LOOKUP[uri].labels.reduce((keyObj, valObj) => (keyObj[valObj.language] = valObj.value, keyObj), {});
return {
"uri": uri,
"id": NAME_LOOKUP[uri]["listid"],
Expand Down Expand Up @@ -104,7 +104,7 @@ define([
valueData.forEach(function(value) {
NAME_LOOKUP[value.uri] = {
"prefLabel": value.labels[arches.activeLanguage],
"labels": value.labels,
"labels": [value.labels],
"listid": value.listid
};
});
Expand Down

0 comments on commit 67653ce

Please sign in to comment.