mirror of
https://github.com/vale981/neutrino_oscillations
synced 2025-03-04 17:21:39 -05:00
fix the fallback implementation
This commit is contained in:
parent
340ad570b6
commit
7252330f87
1 changed files with 5 additions and 3 deletions
8
index.js
8
index.js
|
@ -427,12 +427,14 @@ function serializeNeutrinoData(data) {
|
|||
|
||||
function getWindowNeutrinoData() {
|
||||
const data_string = decodeURI(window.location.href);
|
||||
const json = data_string.slice(data_string.indexOf("?settings=") + "?settings=".length);
|
||||
const settings_index = data_string.indexOf("?settings=");
|
||||
|
||||
if(!json)
|
||||
if (settings_index === -1)
|
||||
return defaultNeutrinoData;
|
||||
|
||||
return JSON.parse();
|
||||
const json = data_string.slice(data_string.indexOf("?settings=") + "?settings=".length);
|
||||
|
||||
return JSON.parse(json);
|
||||
}
|
||||
|
||||
let historyTimeout = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue