From 11d8421e7f81df39b07d970dce8b8475db5e4a2f Mon Sep 17 00:00:00 2001 From: Jaydin_MacBook Date: Thu, 11 Jan 2024 20:18:34 -0500 Subject: [PATCH] House Keeping --- frontend/static/helpers.js | 5 +++++ frontend/static/scripts.js | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/static/helpers.js b/frontend/static/helpers.js index e115664..1018839 100644 --- a/frontend/static/helpers.js +++ b/frontend/static/helpers.js @@ -8,6 +8,11 @@ function getEnv() { } function getApiUrl() { + + if (!config.apiUrl[getEnv()]) { + throw new Error('Api url not found.'); + } + return config.apiUrl[getEnv()] } diff --git a/frontend/static/scripts.js b/frontend/static/scripts.js index cd776a7..96bcccf 100755 --- a/frontend/static/scripts.js +++ b/frontend/static/scripts.js @@ -1,5 +1,3 @@ -import { getApiUrl } from "./helpers"; - $(function () { // init feather icons feather.replace();