From bca3d331306b49c78a4792ab89d133f016fa3130 Mon Sep 17 00:00:00 2001 From: Sardo Date: Sat, 3 Feb 2024 16:01:19 +0800 Subject: [PATCH] Fix the bug of try to load save on first time --- vue-src/src/App.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vue-src/src/App.vue b/vue-src/src/App.vue index 47ee77e..587b6cb 100644 --- a/vue-src/src/App.vue +++ b/vue-src/src/App.vue @@ -58,7 +58,12 @@ export default { if(typeof Neutralino === 'undefined'){ savedList = window.localStorage.getItem('todo'); }else{ - savedList = await Neutralino.storage.getData('todo'); + //Check could get the save from storage + try{ + savedList = await Neutralino.storage.getData('todo'); + }catch(ex){ + //Do nothing. + } } if(savedList){ savedList = JSON.parse(savedList);