Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug with displaying of role and type #681

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading