File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -54,22 +54,27 @@ const getChildren = (parent) => {
5454}
5555
5656const getSemanticIdAsSingleKey = ( element ) => {
57- if ( ! element . semanticId ) {
57+ if ( ! element ? .semanticId ) {
5858 return null ;
5959 }
6060
6161 return getReferenceAsSingleKey ( element . semanticId ) ;
6262}
6363
6464const getSupplementarySemanticIdsAsSingleKeys = ( element ) => {
65- if ( ! element . supplementalSemanticIds ) {
65+ if ( ! element ? .supplementalSemanticIds ) {
6666 return null ;
6767 }
6868
6969 return element . supplementalSemanticIds . map ( id => getReferenceAsSingleKey ( id ) ) ;
7070}
7171
7272const getReferenceAsSingleKey = ( reference ) => {
73+
74+ if ( ! reference ?. keys ) {
75+ return null ;
76+ }
77+
7378 const keys = reference . keys ;
7479 return keys [ keys . length - 1 ] . value ;
7580}
You can’t perform that action at this time.
0 commit comments