fix: add null check for top charts bg gradient

This commit is contained in:
Gabe Farrell 2026-02-03 11:17:42 -05:00
parent 64236c99c9
commit 37809bfc49

View file

@ -40,7 +40,7 @@ export default function ChartLayout<T>({
useEffect(() => {
if ((data?.items?.length ?? 0) === 0) return;
const img = (data.items[0] as any)?.item.image;
const img = (data.items[0] as any)?.item?.image;
if (!img) return;
average(imageUrl(img, "small"), { amount: 1 }).then((color) => {