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();