[develop | DONE | CHANGED] : String utils - urlPrefix add check in case url is null

This commit is contained in:
argirok 2023-12-01 17:13:16 +02:00
parent f537920702
commit 6daf729374
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ export class StringUtils {
public static jsonRegex = /^[\],:{}\s]*$/;
public static urlPrefix(url: string): string {
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
if (!url || url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")) {
return "";
} else {
return "//";