From 6a1b96fe6d7875cf847784a81a6ff31155893823 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 13 Jan 2022 17:46:57 +0000 Subject: [PATCH] Test fix --- packages/builder/src/builderStore/api.js | 4 ---- packages/builder/src/pages/builder/portal/apps/index.svelte | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/builderStore/api.js b/packages/builder/src/builderStore/api.js index 62ddfaeaa5..897d3a74db 100644 --- a/packages/builder/src/builderStore/api.js +++ b/packages/builder/src/builderStore/api.js @@ -1,7 +1,6 @@ import { store } from "./index" import { get as svelteGet } from "svelte/store" import { removeCookie, Cookies } from "./cookies" -import { notifications } from "@budibase/bbui" const apiCall = method => @@ -15,9 +14,6 @@ const apiCall = }) if (resp.status === 403) { if (url.includes("/api/templates")) { - notifications.error( - "There was a problem loading quick start templates." - ) return { json: () => [] } } removeCookie(Cookies.Auth) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index c85ad79d45..ac10b5317f 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -274,6 +274,9 @@ onMount(async () => { await apps.load() await templates.load() + if ($templates?.length === 0) { + notifications.error("There was a problem loading quick start templates.") + } // if the portal is loaded from an external URL with a template param const initInfo = await auth.getInitInfo() if (initInfo?.init_template) {