Skip to content

Commit

Permalink
Remove unnecessary validation after urljoin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Mar 4, 2024
1 parent f330df9 commit f0bcf61
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/components/referral/CustomLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export default function CustomLink(props: React.PropsWithChildren<LinkProps>) {
function augmentLink(link: LinkProps['href'], refId: string) {
if (typeof link === 'string') {
if (link.startsWith('http')) return link
// urljoin have issue with '/', '?ref=...', where it becomes '/ref=...'
if (link === '/') return `/?ref=${refId}`
return urlJoin(link, `?ref=${refId}`)
} else {
return {
Expand Down

0 comments on commit f0bcf61

Please sign in to comment.