fix: url validation if empty string
This commit is contained in:
parent
695b9d337c
commit
4539bb9e79
1 changed files with 1 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
export function isURL(str: string): boolean {
|
export function isURL(str: string): boolean {
|
||||||
// TODO: improve pls
|
// TODO: improve pls
|
||||||
|
if (!str) return false;
|
||||||
return str.includes("http://") || str.includes("https://");
|
return str.includes("http://") || str.includes("https://");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue