From c572096a50d7e4eb0e567a58eb47139fec2cf10f Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 1 Jan 2025 09:02:21 -0800 Subject: [PATCH] safe data access --- Client/src/Pages/Infrastructure/Details/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/src/Pages/Infrastructure/Details/index.jsx b/Client/src/Pages/Infrastructure/Details/index.jsx index 10e070ee4..29eddb9fc 100644 --- a/Client/src/Pages/Infrastructure/Details/index.jsx +++ b/Client/src/Pages/Infrastructure/Details/index.jsx @@ -221,7 +221,7 @@ const InfrastructureDetails = () => { const buildStatBoxes = (stats, uptime) => { if (Object.keys(stats).length === 0) return []; - let latestCheck = stats.aggregateData.latestCheck ?? null; + let latestCheck = stats?.aggregateData?.latestCheck ?? null; if (latestCheck === null) return []; // Extract values from latest check @@ -317,7 +317,7 @@ const InfrastructureDetails = () => { const buildGaugeBoxConfigs = (stats) => { if (Object.keys(stats).length === 0) return []; - let latestCheck = stats.aggregateData.latestCheck ?? null; + let latestCheck = stats?.aggregateData?.latestCheck ?? null; if (latestCheck === null) return []; // Extract values from latest check