Commit be28b785 authored by Robert Lord's avatar Robert Lord

Fix scrollIntoView undefined bug when there is no hash, fixes #114

Thanks to @kevin-buttercoin for this fix!
parent 902ddd7f
......@@ -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
......
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