From 2f1f575a63544e6c4c6488dd0da3db0293d474ab Mon Sep 17 00:00:00 2001 From: Simon Kusterer Date: Fri, 18 Aug 2023 16:28:19 +0200 Subject: [PATCH] handle case when localforage.getItem throws an error --- src/controllers/sheetmanage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/sheetmanage.js b/src/controllers/sheetmanage.js index ba874d4a..80942d4f 100644 --- a/src/controllers/sheetmanage.js +++ b/src/controllers/sheetmanage.js @@ -1069,6 +1069,10 @@ const sheetmanage = { server.clearcachelocaldata(function() { ini(); }); + }) + .catch(function(e) { + ini(); + console.log("缓存操作失败"); }); } catch (e) { ini();