Skip to content

Commit

Permalink
Database: catch failure to save to storage.sync
Browse files Browse the repository at this point in the history
It should be nonfatal due to the possibility of being over quota (but
still should be reported).
  • Loading branch information
tanriol committed Jun 8, 2020
1 parent e06c0f7 commit 495e1fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,9 @@ export let Database = {
}
feeds = minimizedFeeds;
let store_local = browser.storage.local.set({feeds});
let store_sync = browser.storage.sync.set({feeds});
let store_sync = browser.storage.sync.set({feeds}).catch(error => {
console.warn("Brief failed to save feedlist to storage.sync:", error);
});
await Promise.all([store_local, store_sync]);
},

Expand Down

0 comments on commit 495e1fd

Please sign in to comment.