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:
commit
988c66a701
1 changed files with 1 additions and 0 deletions
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue