From 42e9b2f62804a8f26944ec847e9187346d9ff5eb Mon Sep 17 00:00:00 2001 From: Annika Merris Date: Sat, 2 Mar 2024 18:43:15 -0500 Subject: [PATCH] Why Is Config Broken On the Server? --- src/stores/powerItems.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/stores/powerItems.ts b/src/stores/powerItems.ts index e6f2cdf..b90c33e 100644 --- a/src/stores/powerItems.ts +++ b/src/stores/powerItems.ts @@ -50,6 +50,13 @@ export const usePowerItems = defineStore('powerItems', () => { //#region loaders async function fetchBlessingItems() { + getConfig().then((conf: Config | null) => { + if (conf !== null) { + apiBaseURL = conf.apiBaseURL + return conf + } + throw new Error("Could not fetch config") + }) axios .get(apiBaseURL + '/powerItems/byType/' + BLESSING + '/asMap', noCacheConfig) .then((resp) => {