diff --git a/Client/src/Pages/Details/index.jsx b/Client/src/Pages/Details/index.jsx index 75ceab09e..0ccea222d 100644 --- a/Client/src/Pages/Details/index.jsx +++ b/Client/src/Pages/Details/index.jsx @@ -11,7 +11,6 @@ import Typography from '@mui/material/Typography'; import { StatusLabel } from "../../Components/Label/"; import PropTypes from 'prop-types'; -// Styled components const StyledTableCell = styled(TableCell)(({ theme }) => ({ [`&.${tableCellClasses.head}`]: { backgroundColor: theme.palette.action.hover, @@ -41,11 +40,11 @@ function createData(name, date, message) { const CustomizedTables = ({ monitor }) => { const theme = useTheme(); - const rows = monitor.checks.map(check => createData( + const rows = (monitor && monitor.checks) ? monitor.checks.map(check => createData( , new Date(check.createdAt).toLocaleString(), `HTTP ${check.statusCode} - ${check.status ? 'OK' : 'NOK'}` - )); + )) : []; return (