add fallback if state is not in uri

This commit is contained in:
Valentin Boettcher 2021-02-21 20:44:48 +01:00
parent fdf017bc99
commit 340ad570b6

View file

@ -427,7 +427,12 @@ function serializeNeutrinoData(data) {
function getWindowNeutrinoData() { function getWindowNeutrinoData() {
const data_string = decodeURI(window.location.href); const data_string = decodeURI(window.location.href);
return JSON.parse(data_string.slice(data_string.indexOf("?settings=") + "?settings=".length)); const json = data_string.slice(data_string.indexOf("?settings=") + "?settings=".length);
if(!json)
return defaultNeutrinoData;
return JSON.parse();
} }
let historyTimeout = null; let historyTimeout = null;