mirror of
https://github.com/vale981/neutrino_oscillations
synced 2025-03-04 17:21:39 -05:00
add fallback if state is not in uri
This commit is contained in:
parent
fdf017bc99
commit
340ad570b6
1 changed files with 6 additions and 1 deletions
7
index.js
7
index.js
|
@ -427,7 +427,12 @@ function serializeNeutrinoData(data) {
|
|||
|
||||
function getWindowNeutrinoData() {
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue