diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-28 11:28:52 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-12-28 11:28:52 -0600 |
commit | 5fe5f33d6ba40ef4f934d60575910f6999534042 (patch) | |
tree | ba5e54a52f06ec51a3ed36a49a0a72f662282400 | |
parent | 4704a59768dd34c588c50f83206f4f9a1a1dc71f (diff) | |
download | gitlab-ce-5fe5f33d6ba40ef4f934d60575910f6999534042.tar.gz |
don't take for granted that all anchor tags have an href attribute
-rw-r--r-- | app/assets/javascripts/application.js | 2 |
1 files changed, 1 insertions, 1 deletions
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); } }); |