mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +00:00
Fix scrollIntoView undefined bug when there is no hash, fixes #114
Thanks to @kevin-buttercoin for this fix!
This commit is contained in:
parent
902ddd7fdc
commit
be28b785a1
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue