File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ export function TechSidebar({
452452 return null ;
453453 }
454454 const adjacencyElements = adjacencies . map ( adjacency => (
455- < li key = { `adj-${ JSON . stringify ( adjacency ) } ` } > { getReadableAdjacency ( adjacency ) } </ li >
455+ < li key = { `adj-${ adjacency . dataName } ` } > { getReadableAdjacency ( adjacency ) } </ li >
456456 ) ) ;
457457 return (
458458 < >
@@ -594,13 +594,17 @@ export function TechSidebar({
594594
595595 if ( claims . length === 0 ) return null ;
596596
597- const claimsElements = claims . flatMap ( claim => {
597+ // deduplicate claims by dataName
598+ const uniqueClaims = Array . from ( new Set ( claims . map ( claim => claim . dataName ) ) )
599+ . map ( dataName => claims . find ( claim => claim . dataName === dataName ) ! ) ;
600+
601+ const claimsElements = uniqueClaims . flatMap ( claim => {
598602 const text = getReadableClaim ( claim ) ;
599603 if ( ! text ) {
600604 return [ ] ;
601605 }
602606 return [
603- < li key = { `claim-${ JSON . stringify ( claim ) } ` } > { text } </ li >
607+ < li key = { `claim-${ claim . dataName } ` } > { text } </ li >
604608 ] ;
605609 } ) ;
606610
You can’t perform that action at this time.
0 commit comments