aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/hooks
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-11-16 13:28:57 -0300
committerSebastian <sebasjm@gmail.com>2023-11-16 13:28:57 -0300
commitc4ff77168e233235dcdea24108701dbc9f57fd87 (patch)
tree4c1d5858f7d76c3276a279ba18f7121b06e11c65 /packages/aml-backoffice-ui/src/hooks
parent3acb70a539d9ea99971c83d31b57aa1ca65049b8 (diff)
take domain from baseurl instead of browser
Diffstat (limited to 'packages/aml-backoffice-ui/src/hooks')
-rw-r--r--packages/aml-backoffice-ui/src/hooks/useBackend.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/aml-backoffice-ui/src/hooks/useBackend.ts b/packages/aml-backoffice-ui/src/hooks/useBackend.ts
index 95277a915..0615c9c99 100644
--- a/packages/aml-backoffice-ui/src/hooks/useBackend.ts
+++ b/packages/aml-backoffice-ui/src/hooks/useBackend.ts
@@ -74,8 +74,8 @@ export function getInitialBackendBaseURL(): string {
if (!uiSettings.backendBaseURL) {
console.error(
"ERROR: backendBaseURL was overridden by a setting file and missing. Setting value to 'window.origin'",
- );
- result = window.origin
+ );
+ result = typeof (window as any) !== "undefined" ? window.origin : "localhost"
} else {
result = uiSettings.backendBaseURL;
}