Skip to content

Commit 08c9fee

Browse files
committed
chore: restore empty array fallback for GridItem data
1 parent f6c4c4e commit 08c9fee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/StatsBoxGrid/GridItem.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ export const GridItem = ({ metric }: GridItemProps) => {
145145
labels: filteredRange,
146146
datasets: [
147147
{
148-
data: dataValues.slice(dataValues.length - filteredRange!.length),
148+
data: hasData
149+
? dataValues.slice(dataValues.length - filteredRange!.length)
150+
: [],
149151
},
150152
],
151153
}

0 commit comments

Comments
 (0)