Skip to content

Commit

Permalink
Fixing pages where commemorations are not expected (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmolenda authored Dec 17, 2024
1 parent ece9149 commit c3764c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/BilingualContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const Article = (props) => {
{content.info.title}
</Typography>
}
{ content.info.commemorations.length > 0 && <Typography variant="h3">{COMMEMORATION[props.lang]}{" "}{content.info.commemorations.join(", ")}</Typography> }
{ content.info.commemorations && content.info.commemorations.length > 0 && <Typography variant="h3">{COMMEMORATION[props.lang]}{" "}{content.info.commemorations.join(", ")}</Typography> }
<Box sx={{ padding: "0.5rem" }}>
<ArticleTags info={content.info} lang={props.lang} showIcon />
</Box>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Proper.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const Sidenav = (props) => {
primary={indexItem.title}
secondary={`${formatDate(dateParsed)} /
${RANK_NAMES[props.lang][indexItem.rank]}
${indexItem.commemorations.length > 0 ? " / " + COMMEMORATION[props.lang] + " " + indexItem.commemorations.join(", ") : ""}`}
${(indexItem.commemorations && indexItem.commemorations.length > 0) ? " / " + COMMEMORATION[props.lang] + " " + indexItem.commemorations.join(", ") : ""}`}
/>
</ListItemButton>
</SidenavListItem>
Expand Down

0 comments on commit c3764c4

Please sign in to comment.