mirror of
https://github.com/danbulant/api_docs
synced 2026-06-20 23:01:35 +00:00
Fix #75, don't set page hash to undefined
This commit is contained in:
parent
5a69760f54
commit
4d4f6efeb8
1 changed files with 5 additions and 3 deletions
|
|
@ -722,12 +722,14 @@
|
||||||
|
|
||||||
if(self.options.scrollHistory) {
|
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);
|
history.replaceState({}, "", "#" + anchorText);
|
||||||
// provide a fallback
|
// provide a fallback
|
||||||
} else {
|
} else {
|
||||||
scrollV = document.body.scrollTop;
|
scrollV = document.body.scrollTop;
|
||||||
scrollH = document.body.scrollLeft;
|
scrollH = document.body.scrollLeft;
|
||||||
location.hash = "#" + anchorText;
|
location.hash = "#" + anchorText;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue