diff --git a/src/shared/utils.ts b/src/shared/utils.ts index df7673a4..c9d3e919 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -327,7 +327,12 @@ export function isVideo(url: string) { } export function validURL(str: string) { - return !!new URL(str); + try { + new URL(str); + return true; + } catch (_) { + return false; + } } export function validInstanceTLD(str: string) {