Skip to content
Snippets Groups Projects
Commit 7f78bcfe authored by esikkala's avatar esikkala
Browse files

Info header: handle missing prefLabel

parent 34a1e87c
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ const InfoHeader = props => {
let label = ''
const data = props.instanceData
const hasData = data !== null && Object.values(data).length >= 1
if (hasData) { label = data.prefLabel.prefLabel || data.prefLabel }
if (hasData && data.prefLabel) { label = data.prefLabel.prefLabel || data.prefLabel }
return label
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment