Skip to content

Commit

Permalink
Merge pull request #3 from wali-s/patch-1
Browse files Browse the repository at this point in the history
fixed an issue that would cause crawlme to encounter an error when handl...
  • Loading branch information
arokor committed Nov 26, 2013
2 parents 0246ae9 + 79d4aa7 commit 3057fe4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/crawlme.js
Expand Up @@ -84,8 +84,10 @@ exports = module.exports = function(options) {
var links = browser.queryAll('a');
links.forEach(function(link) {
var href = link.getAttribute('href');
var absoluteUrl = urlParser.resolve(url, href);
link.setAttribute('href', absoluteUrl);
if(href !== null) {
var absoluteUrl = urlParser.resolve(url, href);
link.setAttribute('href', absoluteUrl);
}
});

var snapshot = stripScripts(browser.html());
Expand Down

0 comments on commit 3057fe4

Please sign in to comment.