From 26213d5e8c2dd66dc381b2dad8c54c789d515694 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 16 Nov 2021 22:34:08 +0100 Subject: [PATCH] fix: api not found by default --- src/helpers/checkAndSetApiUrl.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/helpers/checkAndSetApiUrl.ts b/src/helpers/checkAndSetApiUrl.ts index d3496568e..611fff83a 100644 --- a/src/helpers/checkAndSetApiUrl.ts +++ b/src/helpers/checkAndSetApiUrl.ts @@ -7,6 +7,10 @@ export const ERROR_NO_API_URL = 'noApiUrlProvided' const updateConfig = () => store.dispatch('config/update') export const checkAndSetApiUrl = (url: string): Promise => { + if(url.startsWith('/')) { + url = window.location.host + url + } + // Check if the url has an http prefix if ( !url.startsWith('http://') &&