mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-07 21:48:18 -08:00
fix: add null check for top charts bg gradient
This commit is contained in:
parent
64236c99c9
commit
37809bfc49
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ export default function ChartLayout<T>({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if ((data?.items?.length ?? 0) === 0) return;
|
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;
|
if (!img) return;
|
||||||
|
|
||||||
average(imageUrl(img, "small"), { amount: 1 }).then((color) => {
|
average(imageUrl(img, "small"), { amount: 1 }).then((color) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue