mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
swagger: avoid errors when using invalid rapi-doc fragment ids #465
This commit is contained in:
parent
fd1c03b82f
commit
7722748432
1 changed files with 8 additions and 6 deletions
|
@ -803,12 +803,14 @@ function scrollToFragment() {
|
|||
return;
|
||||
}
|
||||
window.setTimeout(function(){
|
||||
var e = document.querySelector( window.location.hash );
|
||||
if( e && e.scrollIntoView ){
|
||||
e.scrollIntoView({
|
||||
block: 'start',
|
||||
});
|
||||
}
|
||||
try{
|
||||
var e = document.querySelector( window.location.hash );
|
||||
if( e && e.scrollIntoView ){
|
||||
e.scrollIntoView({
|
||||
block: 'start',
|
||||
});
|
||||
}
|
||||
} catch( e ){}
|
||||
}, 10);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue