b44b46109c
Update try/catch syntax to prepare for eslint migration
8 lines
116 B
TypeScript
8 lines
116 B
TypeScript
export const getURLSafely = (url: string) => {
|
|
try {
|
|
return new URL(url);
|
|
} catch {
|
|
return null;
|
|
}
|
|
};
|