d916ec0af9
closes https://github.com/twentyhq/twenty/issues/13207 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
8 lines
129 B
TypeScript
8 lines
129 B
TypeScript
export const getURLSafely = (url: string) => {
|
|
try {
|
|
return new URL(url);
|
|
} catch (e: unknown) {
|
|
return null;
|
|
}
|
|
};
|