fix non-dev

This commit is contained in:
Sara
2023-12-14 16:21:59 +01:00
parent 4869e760a8
commit c4557bb9e2

View File

@@ -1,6 +1,5 @@
import { get } from "@vercel/edge-config";
import { isDevelopment } from "./utils";
import { localConfig } from "../../config";
type EdgeConfig = {
[domainWithDash: string]: {
@@ -32,7 +31,7 @@ export function edgeDomainToKey(domain: string) {
// get edge config server-side (prefer DomainContext when available), domain is the hostname
export async function getConfig(domain: string) {
if (isDevelopment()) {
return localConfig;
return require("../../config").localConfig;
}
let config = await get(edgeDomainToKey(domain));