1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

Merge pull request #56 from coltonehrman/fix/chart-error

fix: don't render chart without width or height
This commit is contained in:
Josh Pigford 2024-01-14 13:42:20 -06:00 committed by GitHub
commit 988c66a701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,6 +49,7 @@ export function Chart<TDatum extends Datum>({
// Prevent chart errors from crashing entire UI
<ParentSize>
{({ width, height }) => {
if (!width || !height || width <= 0 || height <= 0) return null
return (
// Set to relative for error boundary overlay
<div className="relative w-full h-full">