From fa1e618fa178bd6b79c4fd27e51753665a0f7dbc Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 23 Sep 2022 19:29:56 +0100 Subject: [PATCH] Fix for create app buttons when usage is not being tracked --- packages/builder/src/pages/builder/portal/apps/create.svelte | 4 ++-- packages/builder/src/pages/builder/portal/apps/index.svelte | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/apps/create.svelte b/packages/builder/src/pages/builder/portal/apps/create.svelte index 2dda17875b..00b446b02a 100644 --- a/packages/builder/src/pages/builder/portal/apps/create.svelte +++ b/packages/builder/src/pages/builder/portal/apps/create.svelte @@ -45,7 +45,7 @@ }) const initiateAppCreation = () => { - if ($licensing.usageMetrics.apps >= 100) { + if ($licensing?.usageMetrics?.apps >= 100) { appLimitModal.show() } else { template = null @@ -60,7 +60,7 @@ } const initiateAppImport = () => { - if ($licensing.usageMetrics.apps >= 100) { + if ($licensing?.usageMetrics?.apps >= 100) { appLimitModal.show() } else { template = { fromFile: true } diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index e4cacada81..99721e980d 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -127,7 +127,7 @@ } const initiateAppCreation = async () => { - if ($licensing.usageMetrics.apps >= 100) { + if ($licensing?.usageMetrics?.apps >= 100) { appLimitModal.show() } else if ($apps?.length) { $goto("/builder/portal/apps/create")