diff --git a/src/dissectLink.js b/src/dissectLink.js index 13c1981..f755b20 100644 --- a/src/dissectLink.js +++ b/src/dissectLink.js @@ -62,7 +62,7 @@ module.exports = function dissectLink(url) { return acc; } - const match = host.pattern.match(url); + const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes if(match) { return Object.assign(match, {