Skip to content

Commit

Permalink
Support multivalued metadata fields fixes #2591
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Jul 1, 2020
1 parent 328c849 commit 280d01d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/LabelValueMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class LabelValueMetadata extends Component {
{labelValuePairs.reduce((acc, labelValuePair, i) => acc.concat([
<Typography component="dt" key={`label-${i}`} variant="subtitle2">{labelValuePair.label || defaultLabel}</Typography>,
<Typography style={{ marginBottom: '.5em', marginLeft: '0px' }} component="dd" key={`value-${i}`} variant="body1">
<SanitizedHtml htmlString={labelValuePair.value} ruleSet="iiif" />
<SanitizedHtml htmlString={labelValuePair.values.join(', ')} ruleSet="iiif" />
</Typography>,
]), [])}
</dl>
Expand Down
2 changes: 1 addition & 1 deletion src/state/selectors/manifests.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export function getDestructuredMetadata(iiifResource) {
return (iiifResource
&& iiifResource.getMetadata().map(labelValuePair => ({
label: labelValuePair.getLabel(),
value: labelValuePair.getValue(),
values: labelValuePair.getValues(),
}))
);
}
Expand Down

0 comments on commit 280d01d

Please sign in to comment.