diff --git a/src/utils/combineUrls.ts b/src/utils/combineUrls.ts index 3f37003..f351b4c 100644 --- a/src/utils/combineUrls.ts +++ b/src/utils/combineUrls.ts @@ -1,5 +1,5 @@ export const combineUrls = (baseUrl: string, relativeUrl: string) => { return relativeUrl - ? baseUrl.replace(/\/+$/, '') + '/' + relativeUrl.replace(/^\/+/, '') + ? baseUrl.replace(/\/?\/$/, '') + '/' + relativeUrl.replace(/^\/+/, '') : baseUrl; };