diff --git a/node/src/style/style.scss b/node/src/style/style.scss index e3aec198..65ca9798 100644 --- a/node/src/style/style.scss +++ b/node/src/style/style.scss @@ -1115,6 +1115,9 @@ body { .object { color: #a567a7; } + .no-object { + color: #808080; + } } li:first-child { margin-top: 0px; diff --git a/node/src/ts/visualizer/components/ClassRelationsDetail.tsx b/node/src/ts/visualizer/components/ClassRelationsDetail.tsx index c950809b..0f03529a 100644 --- a/node/src/ts/visualizer/components/ClassRelationsDetail.tsx +++ b/node/src/ts/visualizer/components/ClassRelationsDetail.tsx @@ -44,7 +44,9 @@ const ClassRelationsDetail: React.FC = (props) => { } const subject = getPreferredLabel(triple[0], classes, intl.locale) const predicate = getPreferredLabel(triple[1], classes, intl.locale) - const object = getPreferredLabel(triple[2], classes, intl.locale) + const object = + getPreferredLabel(triple[2], classes, intl.locale) ?? + intl.formatMessage({ id: 'detail.no.object' }) return `<${subject}><${predicate}><${object}>` }, [classes, intl.locale] @@ -124,7 +126,11 @@ const ClassRelationsDetail: React.FC = (props) => { e.preventDefault() dispatch(DetailAction.showRelation(rhs)) } - const triple = [focusingURI || '', rhs[0], rhs[1]] + const triple = [ + focusingURI || '', + rhs[0], + rhs[1] ?? intl.formatMessage({ id: 'detail.no.object' }), + ] return (