From ecbd7f427fc7dad39e6443c05e706809daf5842b Mon Sep 17 00:00:00 2001 From: Colton Ehrman Date: Sun, 14 Jan 2024 13:10:53 -0600 Subject: [PATCH] fix: don't render chart without width or height --- libs/client/shared/src/components/charts/time-series/Chart.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/client/shared/src/components/charts/time-series/Chart.tsx b/libs/client/shared/src/components/charts/time-series/Chart.tsx index 40ca37fe..0cdb2574 100644 --- a/libs/client/shared/src/components/charts/time-series/Chart.tsx +++ b/libs/client/shared/src/components/charts/time-series/Chart.tsx @@ -49,6 +49,7 @@ export function Chart({ // Prevent chart errors from crashing entire UI {({ width, height }) => { + if (!width || !height || width <= 0 || height <= 0) return null return ( // Set to relative for error boundary overlay