Skip to content

Commit

Permalink
Merge pull request #987 from Onlineberatung/OB-5604
Browse files Browse the repository at this point in the history
fix: fix urls without domain
  • Loading branch information
web-mi authored Jan 16, 2024
2 parents 5e6c243 + 1e154e1 commit 4cea5c2
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 4cea5c2

Please sign in to comment.