Skip to content

Commit

Permalink
null checks for variables
Browse files Browse the repository at this point in the history
  • Loading branch information
GihanAyesh committed Feb 19, 2024
1 parent d3beab7 commit 1911ae6
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ export default function Environments() {
container
spacing={3}
>
{internalGateways && internalGateways.map((row) => (
{allEnvRevision && internalGateways && internalGateways.map((row) => (
<Grid item xs={4}>
<Card
style={{
Expand Down Expand Up @@ -2580,7 +2580,7 @@ export default function Environments() {
<TableCell component='th' scope='row'>
{row.displayName}
</TableCell>
{allEnvDeployments[row.name].revision != null ? (
{allEnvDeployments && allEnvDeployments[row.name].revision != null ? (
<>
<TableCell align='left' id='gateway-access-url-cell'>
<div className={classes.primaryEndpoint}>
Expand Down Expand Up @@ -2677,16 +2677,18 @@ export default function Environments() {
</>
)}
<TableCell component='th' scope='row'>
{getDeployedRevisionComponent(row, allEnvRevisionMapping)}
{allEnvRevisionMapping &&
getDeployedRevisionComponent(row, allEnvRevisionMapping)}
</TableCell>
<TableCell align='left' style={{ width: '300px' }}>
{getDeployedRevisionStatusComponent(row, allEnvRevisionMapping)}
{allEnvRevisionMapping &&
getDeployedRevisionStatusComponent(row, allEnvRevisionMapping)}
</TableCell>
<TableCell align='left'>
<DisplayDevportal
name={row.name}
api={api}
EnvDeployments={allEnvDeployments[row.name]}
EnvDeployments={allEnvDeployments && allEnvDeployments[row.name]}
/>
</TableCell>
</TableRow>
Expand Down

0 comments on commit 1911ae6

Please sign in to comment.