From ade620c9a5b30d12eef8e202e0564f3373e70f37 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Tue, 19 Dec 2023 16:13:47 -0800 Subject: [PATCH] Temporarily fix undefined billing limit Since the 1.5.x branch hasn't been updated with the billing changes, this change adds a fallback so that the console still functions. --- src/lib/layout/containerHeader.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/layout/containerHeader.svelte b/src/lib/layout/containerHeader.svelte index 08a7813f1..4c348b81a 100644 --- a/src/lib/layout/containerHeader.svelte +++ b/src/lib/layout/containerHeader.svelte @@ -34,8 +34,15 @@ let showDropdown = false; + // TODO: remove the default billing limits when backend is updated with billing code const { bandwidth, documents, storage, users, executions } = ($organization ?? {}) - .billingLimits; + .billingLimits ?? { + bandwidth: 1, + documents: 1, + storage: 1, + users: 1, + executions: 1 + }; const limitedServices = [ { name: 'bandwidth', value: bandwidth }, { name: 'documents', value: documents },