Removed pointless caching of common.json.
This commit is contained in:
parent
00ddabe46a
commit
bc6532cfc5
1 changed files with 5 additions and 13 deletions
|
@ -46,20 +46,12 @@ const Umi = { UI: {} };
|
||||||
lo.setMessage('Loading environment...');
|
lo.setMessage('Loading environment...');
|
||||||
try {
|
try {
|
||||||
window.futami = await FutamiCommon.load();
|
window.futami = await FutamiCommon.load();
|
||||||
localStorage.setItem('mami:common', JSON.stringify(window.futami));
|
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
try {
|
console.error(ex);
|
||||||
const cached = JSON.parse(localStorage.getItem('mami:common'));
|
lo.setIcon('cross');
|
||||||
if(cached === null)
|
lo.setHeader('Failed!');
|
||||||
throw 'Cached data is null.';
|
lo.setMessage('Failed to load common settings!');
|
||||||
window.futami = new FutamiCommon(cached);
|
return;
|
||||||
} catch(ex) {
|
|
||||||
console.error(ex);
|
|
||||||
lo.setIcon('cross');
|
|
||||||
lo.setHeader('Failed!');
|
|
||||||
lo.setMessage('Failed to load common settings!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue