Skip to content

Commit

Permalink
fix: fix urls without domain
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mi committed Jan 16, 2024
1 parent 5e6c243 commit 1e154e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/globalState/provider/LegalLinksProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ export function LegalLinksProvider({
...legalLink,
getUrl: (params: {
[key: string]: string | number | null | undefined;
}) => getUrl(url, params)
}) =>
getUrl(
url.match(/http(s)?:\/\//)
? url
: `${window.location.origin}${url}`,
params
)
})
),
[externalLegalLinks, settings.legalLinks, getUrl]
Expand Down

0 comments on commit 1e154e1

Please sign in to comment.