diff --git a/www/app/lib/edgeConfig.ts b/www/app/lib/edgeConfig.ts index 5291a79a..1fdf77b6 100644 --- a/www/app/lib/edgeConfig.ts +++ b/www/app/lib/edgeConfig.ts @@ -39,11 +39,13 @@ export async function getConfig(domain: string) { } let config = await get(edgeDomainToKey(domain)); - console.warn("No config for this domain, falling back to default"); - config = await get(edgeDomainToKey("default")); + if (typeof config !== "object") { + console.warn("No config for this domain, falling back to default"); + config = await get(edgeDomainToKey("default")); + } - if (typeof config !== "object") throw Error("Error fetchig config"); + if (typeof config !== "object") throw Error("Error fetching config"); return config as DomainConfig; }