safe data access
This commit is contained in:
1 parent
180585806b
commit
c572096a50
1 file changed
+2
-2
@@ -221,7 +221,7 @@ const InfrastructureDetails = () => {
|
|||||||
|
|
||||||
const buildStatBoxes = (stats, uptime) => {
|
const buildStatBoxes = (stats, uptime) => {
|
||||||
if (Object.keys(stats).length === 0) return [];
|
if (Object.keys(stats).length === 0) return [];
|
||||||
let latestCheck = stats.aggregateData.latestCheck ?? null;
|
let latestCheck = stats?.aggregateData?.latestCheck ?? null;
|
||||||
if (latestCheck === null) return [];
|
if (latestCheck === null) return [];
|
||||||
|
|
||||||
// Extract values from latest check
|
// Extract values from latest check
|
||||||
@@ -317,7 +317,7 @@ const InfrastructureDetails = () => {
|
|||||||
const buildGaugeBoxConfigs = (stats) => {
|
const buildGaugeBoxConfigs = (stats) => {
|
||||||
if (Object.keys(stats).length === 0) return [];
|
if (Object.keys(stats).length === 0) return [];
|
||||||
|
|
||||||
let latestCheck = stats.aggregateData.latestCheck ?? null;
|
let latestCheck = stats?.aggregateData?.latestCheck ?? null;
|
||||||
if (latestCheck === null) return [];
|
if (latestCheck === null) return [];
|
||||||
|
|
||||||
// Extract values from latest check
|
// Extract values from latest check
|
||||||
|
|||||||
Reference in new issue
Block a user