Skip to content

Commit

Permalink
fix: adding https in checkurltype
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince Yadav committed Jul 16, 2024
1 parent 1bfc6ae commit 4524913
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/twenty-front/src/utils/checkUrlType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { LinkType } from '@/ui/navigation/link/components/SocialLink';
import { isDefined } from './isDefined';

export const checkUrlType = (url: string) => {
if (!/^(http|https):\/\//i.test(url)) {
url = 'https://' + url;
}
if (
/^(http|https):\/\/(?:www\.)?linkedin.com(\w+:{0,1}\w*@)?(\S+)(:([0-9])+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/.test(
url,
Expand Down

0 comments on commit 4524913

Please sign in to comment.