mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-26 16:48:32 +00:00
commit
16dab25321
@ -115,7 +115,7 @@ function normalizeUrl(testUrl) {
|
|||||||
if (!parsed.protocol) {
|
if (!parsed.protocol) {
|
||||||
normalized = 'http://' + normalized;
|
normalized = 'http://' + normalized;
|
||||||
}
|
}
|
||||||
if (!validator.isURL(normalized, {require_protocol: true})) {
|
if (!validator.isURL(normalized, {require_protocol: true, require_tld: false})) {
|
||||||
throw `Your Url: "${normalized}" is invalid!`;
|
throw `Your Url: "${normalized}" is invalid!`;
|
||||||
}
|
}
|
||||||
return normalized;
|
return normalized;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user