aboutsummaryrefslogtreecommitdiff
path: root/webAO/client
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2026-02-07 23:01:25 +0100
committerDavid Skoland <davidskoland@gmail.com>2026-02-07 23:01:25 +0100
commit9c68a1afcf178a86063f094b96471fa73531bd9a (patch)
treec05945ddd1048e4016fdb2f78285d6124d3348f9 /webAO/client
parentf26d35429e66ddcdd02c10f57b315b0f02b4add2 (diff)
Use setAOhost return value instead of stale AO_HOST import
setAOhost now returns the current AO_HOST so handleASS can use the freshly set value rather than the import captured before the update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'webAO/client')
-rw-r--r--webAO/client/aoHost.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/webAO/client/aoHost.ts b/webAO/client/aoHost.ts
index 003e237..0d7cb0f 100644
--- a/webAO/client/aoHost.ts
+++ b/webAO/client/aoHost.ts
@@ -2,7 +2,7 @@ import queryParser from "../utils/queryParser";
const { asset } = queryParser();
export let AO_HOST = asset;
-export const setAOhost = (val: string) => {
+export const setAOhost = (val: string): string => {
const currentProtocol = window.location.protocol;
const assetProtocol = val.split(":")[0] + ":";
@@ -19,4 +19,5 @@ export const setAOhost = (val: string) => {
AO_HOST = val;
}
console.log("Asset URL ist now " + AO_HOST);
+ return AO_HOST;
};