Removed pointless caching of common.json.

This commit is contained in:
flash 2024-02-10 04:24:25 +00:00
parent 00ddabe46a
commit bc6532cfc5

View file

@ -46,13 +46,6 @@ 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) {
try {
const cached = JSON.parse(localStorage.getItem('mami:common'));
if(cached === null)
throw 'Cached data is null.';
window.futami = new FutamiCommon(cached);
} catch(ex) { } catch(ex) {
console.error(ex); console.error(ex);
lo.setIcon('cross'); lo.setIcon('cross');
@ -60,7 +53,6 @@ const Umi = { UI: {} };
lo.setMessage('Failed to load common settings!'); lo.setMessage('Failed to load common settings!');
return; return;
} }
}
lo.setMessage('Fetching credentials...'); lo.setMessage('Fetching credentials...');