[develop | DONE | CHANGED] : String utils - urlPrefix add check in case url is null
This commit is contained in:
parent
f537920702
commit
6daf729374
|
@ -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 "//";
|
||||
|
|
Loading…
Reference in New Issue