Skip to content

Commit

Permalink
Early exit when a fragment identifier has no fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Oct 17, 2016
1 parent 15b8327 commit c61c40e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ module.exports = function (options) {
fragmentLinks.forEach(function (anchor) {
var selector = anchor.href.replace('about:blank', '');

if (selector === '#') {
return;
}

t.push(null, {
ok: !!document.querySelector(selector),
name: 'Fragment identifier check: ' + asset.fileName + selector,
Expand Down

0 comments on commit c61c40e

Please sign in to comment.