Commit 4d4f6efe authored by Robert Lord's avatar Robert Lord

Fix #75, don't set page hash to undefined

parent 5a69760f
......@@ -722,12 +722,14 @@
if(self.options.scrollHistory) {
if(window.location.hash !== "#" + anchorText) {
// IF STATEMENT ADDED BY ROBERT
if(history.replaceState) {
if(window.location.hash !== "#" + anchorText && anchorText !== undefined) {
if(history.replaceState) {
history.replaceState({}, "", "#" + anchorText);
// provide a fallback
} else {
} else {
scrollV = document.body.scrollTop;
scrollH = document.body.scrollLeft;
location.hash = "#" + anchorText;
......
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