Skip to content

Commit

Permalink
Merge pull request #681 from SynBioHub/displayroleandtype
Browse files Browse the repository at this point in the history
fixed bug with displaying of role and type
  • Loading branch information
danielfang97 authored Jun 14, 2024
2 parents d3a177e + 581918b commit 66ba89e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions frontend/components/Viewing/MetadataInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ export default function MetadataInfo({ title, link, label, icon, specific, uri }
if (Array.isArray(title) && label === 'Type' || label === 'Role') {
const concatenatedTitle = title.map(item => {
// Accessing the extra_work property for each object in the title array
if (item.props && item.props.sections && item.props.sections.extra_work &&
item.props.sections.extra_work.length > 0) {
return item.props.sections.extra_work[0].result.extra_work;
if (item.props && item.props.children && item.props.children.props.children.props.sections &&
item.props.children.props.children.props.sections.extra_work &&
item.props.children.props.children.props.sections.extra_work.length > 0) {
return item.props.children.props.children.props.sections.extra_work[0].result.extra_work;
}
return ''; // Return an empty string if the path doesn't exist
}).filter(item => item !== '').join(", "); // Filter out empty strings and join
[title, link] = formatMultipleTitles(concatenatedTitle);
}

if (Array.isArray(title) && label === 'Sequence') {
const concatenatedTitle = title.map(item => {
// Accessing the extra_work property for each object in the title array
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/commitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6238315c3165b4b56b39662e692e283f325ee006
4b214d663d2a8faf784303aee3e886818e3c73e8

0 comments on commit 66ba89e

Please sign in to comment.