Skip to content

Commit

Permalink
Errbit | fixing versions table
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 15, 2024
1 parent e9c4c94 commit c3be727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/repos/VersionsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const VersionsTable = ({ selected, versions, onChange, bgColor, checkbox, disabl
<TableBody>
{
versions?.map(version => {
const isSelected = version.version_url == (selected.version_url || selected.url)
const isSelected = version?.version_url == (selected?.version_url || selected?.url)
const disabled = isDisabled(version)
const bodyCellStyle = getBodyCellStyle(isSelected, disabled)
return (
Expand All @@ -168,7 +168,7 @@ const VersionsTable = ({ selected, versions, onChange, bgColor, checkbox, disabl
</TableContainer>
{
checked?.length == 2 &&
<Button sx={{marginTop: '16px', display: 'flex'}} onClick={() => history.push(`${selected.url + 'compare-versions'}?version1=${checked[0]}&version2=${checked[1]}`)} label={t('repo.compare_versions')} color='primary' variant='outlined' />
<Button sx={{marginTop: '16px', display: 'flex'}} onClick={() => history.push(`${selected?.url + 'compare-versions'}?version1=${checked[0]}&version2=${checked[1]}`)} label={t('repo.compare_versions')} color='primary' variant='outlined' />
}
</React.Fragment>
)
Expand Down

0 comments on commit c3be727

Please sign in to comment.