Skip to content

The open source coding agent.

TypeScript

zen: fix chart loading

Frank7a4aa6870637
diff --git a/packages/console/app/src/routes/workspace/[id]/graph-section.tsx b/packages/console/app/src/routes/workspace/[id]/graph-section.tsx
index 2423605d201..46418d61880 100644
--- a/packages/console/app/src/routes/workspace/[id]/graph-section.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/graph-section.tsx
@@ -221,6 +221,8 @@ export function GraphSection() {
const isCurrentMonth = () => store.year === now.getFullYear() && store.month === now.getMonth()
const chartConfig = createMemo((): ChartConfiguration | null => {
+ if (typeof window === "undefined") return null
+
const data = getData()
const dates = getDates()
if (!data?.usage?.length) return null