add check for sessionStorage

This commit is contained in:
Richard Schreiber
2021-12-16 12:54:01 +01:00
parent 690f22d444
commit 0d574ab612
@@ -180,7 +180,7 @@ $(function () {
$("body").removeClass("nojs");
var scrollpos = sessionStorage.getItem('scrollpos');
var scrollpos = sessionStorage ? sessionStorage.getItem('scrollpos') : 0;
if (scrollpos) {
window.scrollTo(0, scrollpos);
sessionStorage.removeItem('scrollpos');