Skip to content

Commit

Permalink
Merge pull request #20 from AdeelK93/master
Browse files Browse the repository at this point in the history
Skip null paths created by hash routing
  • Loading branch information
geelen committed Apr 27, 2017
2 parents 0aa7749 + 2b92dfa commit 6b0c63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class Crawler {
const urlAttribute = tagAttributeMap[tagName]
Array.from(document.querySelectorAll(`${tagName}[${urlAttribute}]`)).forEach(element => {
const { protocol, host, path } = url.parse(element.getAttribute(urlAttribute))
if (protocol || host) return
if (protocol || host || path===null) return;
const relativePath = url.resolve(currentPath, path)
if (!this.processed[relativePath]) this.paths.push(relativePath)
})
Expand Down

0 comments on commit 6b0c63e

Please sign in to comment.