diff --git a/src/pages/usage/apis/resource.ts b/src/pages/usage/apis/resource.ts index 6e6310b7..a42c9d61 100644 --- a/src/pages/usage/apis/resource.ts +++ b/src/pages/usage/apis/resource.ts @@ -269,7 +269,7 @@ function flattenItem( // Per-resource rows (instance / volume) carry their sku → surface it as the // Instance Type / Type column when not already the group key. if (!flat.gpu_type && it.sku) { - flat.gpu_type = it.sku; + flat.gpu_type = it.sku ?? undefined; } return flat; } diff --git a/src/pages/usage/components/gpu-instances-tab.tsx b/src/pages/usage/components/gpu-instances-tab.tsx index 34388d76..14704cdd 100644 --- a/src/pages/usage/components/gpu-instances-tab.tsx +++ b/src/pages/usage/components/gpu-instances-tab.tsx @@ -182,7 +182,7 @@ const GpuInstancesTab: React.FC = () => { // along the contiguous date range. const dataByDate = useMemo(() => { const map = new Map(); - chartData?.items.forEach((item) => { + chartData?.items?.forEach((item) => { if (!item.date) return; map.set(bucketKey(item.date, granularity), Number(item[metric] ?? 0)); }); diff --git a/src/pages/usage/components/storage-tab.tsx b/src/pages/usage/components/storage-tab.tsx index 254a5fc2..e99204a7 100644 --- a/src/pages/usage/components/storage-tab.tsx +++ b/src/pages/usage/components/storage-tab.tsx @@ -168,7 +168,7 @@ const StorageTab: React.FC = () => { const dataByDate = useMemo(() => { const map = new Map(); - chartData?.items.forEach((item) => { + chartData?.items?.forEach((item) => { if (!item.date) return; map.set(bucketKey(item.date, granularity), Number(item[metric] ?? 0)); });