We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc16d28 commit 199bab7Copy full SHA for 199bab7
1 file changed
src/storage.js
@@ -29,6 +29,18 @@ window.setSyncStorage = promisify(chrome.storage.sync.set.bind(chrome.storage.sy
29
window.setStorage = (CONTRIBUTOR, ORG_REPO_PATH, value) => {
30
return window.setSyncStorage({
31
[`${CONTRIBUTOR}|${ORG_REPO_PATH}`]: value
32
+ })
33
+ .catch((e) => {
34
+ if (e.message === "MAX_ITEMS quota exceeded") {
35
+ getSyncStorage({ "access_token": null })
36
+ .then(({ access_token }) => {
37
+ if (access_token) {
38
+ chrome.storage.sync.clear(() => {
39
+ setSyncStorage({ "access_token": access_token });
40
+ });
41
+ }
42
43
44
});
45
};
46
0 commit comments