diff --git a/src/fireedge/src/modules/components/composed/Charts/Chartist.js b/src/fireedge/src/modules/components/composed/Charts/Chartist.js index 38fadbc378..140f2134cb 100644 --- a/src/fireedge/src/modules/components/composed/Charts/Chartist.js +++ b/src/fireedge/src/modules/components/composed/Charts/Chartist.js @@ -245,7 +245,10 @@ const Chartist = ({ () => { if (chartRef.current) { requestAnimationFrame(() => { - const { width, height } = chartRef.current.getBoundingClientRect() + const chart = chartRef.current + if (!chart) return + + const { width, height } = chart.getBoundingClientRect() setChartDimensions({ width: Math.max(width - 16, 50), // Clamping height: Math.max(height - 32, 50), // Clamping