Test fix
This commit is contained in:
parent
ecac3c83c0
commit
6a1b96fe6d
|
@ -1,7 +1,6 @@
|
||||||
import { store } from "./index"
|
import { store } from "./index"
|
||||||
import { get as svelteGet } from "svelte/store"
|
import { get as svelteGet } from "svelte/store"
|
||||||
import { removeCookie, Cookies } from "./cookies"
|
import { removeCookie, Cookies } from "./cookies"
|
||||||
import { notifications } from "@budibase/bbui"
|
|
||||||
|
|
||||||
const apiCall =
|
const apiCall =
|
||||||
method =>
|
method =>
|
||||||
|
@ -15,9 +14,6 @@ const apiCall =
|
||||||
})
|
})
|
||||||
if (resp.status === 403) {
|
if (resp.status === 403) {
|
||||||
if (url.includes("/api/templates")) {
|
if (url.includes("/api/templates")) {
|
||||||
notifications.error(
|
|
||||||
"There was a problem loading quick start templates."
|
|
||||||
)
|
|
||||||
return { json: () => [] }
|
return { json: () => [] }
|
||||||
}
|
}
|
||||||
removeCookie(Cookies.Auth)
|
removeCookie(Cookies.Auth)
|
||||||
|
|
|
@ -274,6 +274,9 @@
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await apps.load()
|
await apps.load()
|
||||||
await templates.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
|
// if the portal is loaded from an external URL with a template param
|
||||||
const initInfo = await auth.getInitInfo()
|
const initInfo = await auth.getInitInfo()
|
||||||
if (initInfo?.init_template) {
|
if (initInfo?.init_template) {
|
||||||
|
|
Loading…
Reference in New Issue