Skip to content

Commit

Permalink
Fix the bug of try to load save on first time
Browse files Browse the repository at this point in the history
  • Loading branch information
falconshark committed Feb 3, 2024
1 parent 476568d commit bca3d33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vue-src/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bca3d33

Please sign in to comment.