Specify exception identifer in catch block

parent 75e11922
......@@ -152,7 +152,7 @@ export function isSafeURL(url) {
try {
const parsedUrl = new URL(url, getBaseURL());
return ['http:', 'https:'].includes(parsedUrl.protocol);
} catch {
} catch (e) {
return false;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment