-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I used the valid-url for my project.
I detected one issue when use this module for the URL that contain ";".
In URL Object it detects that this is not URL but valie-url module passed this.
Could you fix this?
This is my code.
var validUrl = require('valid-url');
if (validUrl.isUri('https://shop.delacier.com;hu.shop.delacier.com/products.json')){
console.log('Looks like an URI');
var myURL = new URL('https://shop.delacier.com;hu.shop.delacier.com/products.json');
console.log(myURL);
} else {
console.log('Not a URI');
var myURL = new URL('https://shop.delacier.com;hu.shop.delacier.com/products.json');
console.log(myURL);
}
Error is following
×
TypeError: Failed to construct 'URL': Invalid URL
Module../src/Pages/AddFeed/FeedUpload.js
E:/ModaComprise/NewCollabration/src/Pages/AddFeed/FeedUpload.js:33
30 |
31 | if (validUrl.isUri('https://shop.delacier.com;hu.shop.delacier.com/products.json')){
32 | console.log('Looks like an URI');
33 | var myURL = new URL('https://shop.delacier.com;hu.shop.delacier.com/products.json');
34 | console.log(myURL);
35 | } else {
36 |
View compiled