From 2b92dfa5a87e261d7b6826d9dc2768a047a848a8 Mon Sep 17 00:00:00 2001 From: Adeel Khan Date: Fri, 21 Apr 2017 12:05:41 -0500 Subject: [PATCH] Skip null paths created by hash routing --- src/Crawler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Crawler.js b/src/Crawler.js index 2032fbd..c06ff4e 100644 --- a/src/Crawler.js +++ b/src/Crawler.js @@ -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) })