From 316ae87a663e3523e45ad10954e2ba5ccd8c2304 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 20 Dec 2023 10:28:35 +0100 Subject: [PATCH] fix: usage page broken when no projects --- .../organization-[organization]/usage/[[invoice]]/+page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts b/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts index 8f5203de9..b1ef9a272 100644 --- a/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts +++ b/src/routes/console/organization-[organization]/usage/[[invoice]]/+page.ts @@ -43,7 +43,7 @@ export const load: PageLoad = async ({ params, parent }) => { const queries: string[] = []; - if (usage.projects.length > 0) { + if (usage?.projects?.length > 0) { queries.push( Query.equal( '$id',