diff --git a/src/common/utils/isValidURL.ts b/src/common/utils/isValidURL.ts index df47f98f6b..cf106f34da 100644 --- a/src/common/utils/isValidURL.ts +++ b/src/common/utils/isValidURL.ts @@ -27,14 +27,12 @@ * @return {boolean} */ export const isValidURL = (url: string | undefined | null) => { - if (Boolean(url)) { - try { - new URL(url); + try { + new URL(url); - return true; - } catch { - // ignore TypeError and return false - } + return true; + } catch { + // ignore TypeError and return false } return false;