From bc6532cfc5f0e32bf856d49c67774ab634fd764b Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 10 Feb 2024 04:24:25 +0000 Subject: [PATCH] Removed pointless caching of common.json. --- src/mami.js/main.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/mami.js/main.js b/src/mami.js/main.js index d5dae22..0e02650 100644 --- a/src/mami.js/main.js +++ b/src/mami.js/main.js @@ -46,20 +46,12 @@ const Umi = { UI: {} }; lo.setMessage('Loading environment...'); try { 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) { - console.error(ex); - lo.setIcon('cross'); - lo.setHeader('Failed!'); - lo.setMessage('Failed to load common settings!'); - return; - } + console.error(ex); + lo.setIcon('cross'); + lo.setHeader('Failed!'); + lo.setMessage('Failed to load common settings!'); + return; }