zen: fix chart loading

closes #5030
pull/5025/head^2
Frank 2025-12-03 18:12:23 -05:00
parent f00380d285
commit 7a4aa68706
1 changed files with 2 additions and 0 deletions

View File

@ -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