swagger: avoid errors when using invalid rapi-doc fragment ids #465

This commit is contained in:
Sören Weber 2023-02-04 13:39:59 +01:00
parent fd1c03b82f
commit 7722748432
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -803,12 +803,14 @@ function scrollToFragment() {
return;
}
window.setTimeout(function(){
try{
var e = document.querySelector( window.location.hash );
if( e && e.scrollIntoView ){
e.scrollIntoView({
block: 'start',
});
}
} catch( e ){}
}, 10);
}