fix: Fix improper use of url.protocol

This commit is contained in:
Susmitha Girumala committed 2021-05-17 15:28:45 -04:00
1 parent 314aa62828
commit 97ee639d62
1 file changed
+1 -1
@@ -21,7 +21,7 @@ module.exports = {
urlValidate: (str) => {
try {
const url = new URL(str);
return `${url.protocol}://${url.host}`;
return `${url.protocol}//${url.host}`;
} catch (e) {
// Parse error
throw new Error(`URL ${str} could not be validated.`);