mirror of
https://github.com/vale981/neutrino_oscillations
synced 2025-03-05 09:41: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() {
|
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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue