Remove double slashes from URLs before matching.
This commit is contained in:
parent
44f32b3347
commit
f579bb2077
|
@ -62,7 +62,7 @@ module.exports = function dissectLink(url) {
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
const match = host.pattern.match(url);
|
const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
|
||||||
|
|
||||||
if(match) {
|
if(match) {
|
||||||
return Object.assign(match, {
|
return Object.assign(match, {
|
||||||
|
|
Loading…
Reference in New Issue