From 5fe5f33d6ba40ef4f934d60575910f6999534042 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Dec 2016 11:28:52 -0600 Subject: don't take for granted that all anchor tags have an href attribute --- app/assets/javascripts/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 7024691f9f7..13d5c6e1e0b 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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); } }); -- cgit v1.2.1