diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index 75d12a8bc..9e8f13dce 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -146,7 +146,7 @@ class Driver { .then(() => { const links = Array.prototype.reduce.call( browser.document.getElementsByTagName('a'), (results, link) => { - if ( link.protocol.match(/https?:/) || link.hostname === this.origPageUrl.hostname || extensions.test(link.pathname) ) { + if ( link.protocol.match(/https?:/) && link.hostname === this.origPageUrl.hostname && extensions.test(link.pathname) ) { link.hash = ''; results.push(url.parse(link.href));