Skip to content

Commit

Permalink
fix(gui): load config relative to current page (fixes #43)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 14, 2023
1 parent c0af709 commit 2e5c786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const POLL_TIME = 5_000; // 5 seconds
export const SAVE_TIME = 5_000; // 5 seconds

export async function loadConfig(): Promise<Config> {
const configPath = new URL('./config.json', window.origin);
const configPath = new URL('./config.json', window.location.href);
const configReq = await fetch(configPath);
if (configReq.status === STATUS_SUCCESS) {
return configReq.json();
Expand Down

0 comments on commit 2e5c786

Please sign in to comment.