From e5d54f7205a66a82b2a08224d10d5691e114052c Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 03:19:29 +0200 Subject: [PATCH] Fix frontend settings * Add check for production mode that frontend settings do not throw erros. --- app/frontend/src/staticsettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/frontend/src/staticsettings.js b/app/frontend/src/staticsettings.js index 1f24d37..f167fe9 100644 --- a/app/frontend/src/staticsettings.js +++ b/app/frontend/src/staticsettings.js @@ -1,4 +1,4 @@ export const DBNAME = 'notify-db'; export const DBVERSION = 1; // if you want to run the gui separate from the api, change this to to your api location example: "http://localhost:8787/api" -export const APIBASE = process ? process?.env?.PREACT_APP_BACKEND_URL ?? "/api" : "/api"; \ No newline at end of file +export const APIBASE = (typeof process !== 'undefined') ? process?.env?.PREACT_APP_BACKEND_URL ?? "/api" : "/api"; \ No newline at end of file