fix: url validation if empty string

This commit is contained in:
Ayo 2023-05-11 16:51:06 +02:00
parent 695b9d337c
commit 4539bb9e79

View file

@ -1,4 +1,5 @@
export function isURL(str: string): boolean {
// TODO: improve pls
if (!str) return false;
return str.includes("http://") || str.includes("https://");
}