diff --git a/components/Description.js b/components/Description.js index 461e47b..4e2372b 100644 --- a/components/Description.js +++ b/components/Description.js @@ -14,7 +14,8 @@ export const previewLength = 750 export default function Description(props) { const { model } = props; const { display_description } = model; - const description = (display_description || model.description || model.instrument_description || model.instrument_host_description || model.investigation_description || model.target_description).trim() + let description = (display_description || model.description || model.instrument_description || model.instrument_host_description || model.investigation_description || model.target_description) + description = description ? description.trim() : '' const alwaysShow = description.length < ridiculousLength; const [expanded, setExpanded] = useState(alwaysShow); const classes = useStyles(); diff --git a/services/desolrize.js b/services/desolrize.js index 577458d..c4fb554 100644 --- a/services/desolrize.js +++ b/services/desolrize.js @@ -1,5 +1,8 @@ function desolrize(dataset) { for(let [key, value] of Object.entries(dataset)) { + if(key == "identifier" && value instanceof Array) { + dataset[key] = value[0] + } if(key.includes(".")) { unpackFlattened(dataset, key, value) delete dataset[key]