Remove Boolean(url)

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen committed 2021-07-08 10:38:37 +03:00
1 parent d2336d1e85
commit 7866ad8d5d
1 file changed
-2
-2
View File
@@ -27,7 +27,6 @@
* @return {boolean} * @return {boolean}
*/ */
export const isValidURL = (url: string | undefined | null) => { export const isValidURL = (url: string | undefined | null) => {
if (Boolean(url)) {
try { try {
new URL(url); new URL(url);
@@ -35,7 +34,6 @@ export const isValidURL = (url: string | undefined | null) => {
} catch { } catch {
// ignore TypeError and return false // ignore TypeError and return false
} }
}
return false; return false;
}; };