diff --git a/source/javascripts/app/lang.js b/source/javascripts/app/lang.js index 6909f34..c59a16b 100644 --- a/source/javascripts/app/lang.js +++ b/source/javascripts/app/lang.js @@ -33,7 +33,9 @@ under the License. global.toc.calculateHeights(); // scroll to the new location of the position - $(window.location.hash).get(0).scrollIntoView(true); + if ($(window.location.hash).get(0)) { + $(window.location.hash).get(0).scrollIntoView(true); + } } // if a button is clicked, add the state to the history