Files
twenty/packages/twenty-shared/src/utils/getURLSafely.ts
T
Félix Malfait b44b46109c Update try/catch syntax (#13732)
Update try/catch syntax to prepare for eslint migration
2025-08-07 22:19:43 +02:00

8 lines
116 B
TypeScript

export const getURLSafely = (url: string) => {
try {
return new URL(url);
} catch {
return null;
}
};