Commit 5fe5f33d authored by Mike Greiling's avatar Mike Greiling

don't take for granted that all anchor tags have an href attribute

parent 4704a597
......@@ -92,7 +92,7 @@
// `hashchange` is not triggered when link target is already in window.location
$body.on('click', 'a', function() {
var href = this.getAttribute('href');
if (href.indexOf('#') === 0 && href.substr(1) === gl.utils.getLocationHash()) {
if (href && href.indexOf('#') === 0 && href.substr(1) === gl.utils.getLocationHash()) {
setTimeout(gl.utils.handleLocationHash, 1);
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment