Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix NaN error in chart headers

Terry Sutton64df54d3bd5d
diff --git a/studio/lib/helpers.ts b/studio/lib/helpers.ts
index 00aac3ddd54..2b30f832157 100644
--- a/studio/lib/helpers.ts
+++ b/studio/lib/helpers.ts
@@ -140,7 +140,7 @@ export const propsAreEqual = (prevProps: any, nextProps: any) => {
}
export const formatBytes = (bytes: any, decimals = 2) => {
- if (bytes === 0) return '0 bytes'
+ if (bytes === 0 || bytes == undefined) return '0 bytes'
const k = 1000
const dm = decimals < 0 ? 0 : decimals