Fixed JSON.parse exceptions
This commit is contained in:
parent
66d579caad
commit
ff3bb02fa0
@ -107,7 +107,11 @@ Config.LangCountries = {"es": "ES", "ru": "RU", "en": "US", "de": "DE", "it": "I
|
|||||||
}
|
}
|
||||||
else if (useLs) {
|
else if (useLs) {
|
||||||
var value = localStorage.getItem(key);
|
var value = localStorage.getItem(key);
|
||||||
value = (value === undefined || value === null) ? false : JSON.parse(value);
|
try {
|
||||||
|
value = (value === undefined || value === null) ? false : JSON.parse(value);
|
||||||
|
} catch (e) {
|
||||||
|
value = false;
|
||||||
|
}
|
||||||
result.push(cache[key] = value);
|
result.push(cache[key] = value);
|
||||||
}
|
}
|
||||||
else if (!useCs) {
|
else if (!useCs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user