1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove Boolean(url)

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen 2021-07-06 16:25:31 +03:00
parent d2336d1e85
commit 7866ad8d5d
No known key found for this signature in database
GPG Key ID: 54B44603D251B788

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;
}; };