mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +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(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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue