Skip to content

Commit 0467e94

Browse files
authored
Merge pull request #19 from FlandreDaisuki/empty-storage-bug
v3.1.2: * Fix empty storage check
2 parents c928aa0 + f9408f2 commit 0467e94

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

background.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ const defaultSettings = {
8686
/* On startup, check whether we have stored settings and set up the context menu.
8787
If we don't, then store the default settings. */
8888
function checkStoredSettings(storedSettings) {
89-
if (storedSettings.openInBackground == null || !storedSettings.openTabAt || !storedSettings.storageProviders) {
89+
if (Object.getOwnPropertyNames(storedSettings).length) {
90+
chrome.storage.sync.get('storageProviders', createContextMenu);
91+
} else {
9092
chrome.storage.sync.set(defaultSettings);
9193
createContextMenu(defaultSettings.storageProviders);
92-
} else {
93-
chrome.storage.sync.get('storageProviders', createContextMenu);
9494
}
9595
}
9696

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "__MSG_extensionName__",
55
"description": "__MSG_extensionDescription__",
66
"author": "Andreas Bielawski",
7-
"version": "3.1.1",
7+
"version": "3.1.2",
88
"icons": {
99
"16": "icons/16.png",
1010
"32": "icons/32.png",

0 commit comments

Comments
 (0)