Skip to content

Commit

Permalink
Fix option errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aledeg committed Apr 25, 2019
1 parent 7a1aee1 commit 8f331cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function handleChanged(delta) {
}
if (delta.state && delta.state.current === 'complete') {
browser.storage.local.get('options').then(obj => {
if (obj.options.clearAfterDownload) {
if (obj.options !== undefined && obj.options.clearAfterDownload) {
browser.storage.local.remove('urls');
}
}).then(notification('notificationDownloadComplete'));
Expand All @@ -155,7 +155,7 @@ function handleMessage(message) {
}
case 'copied': {
browser.storage.local.get('options').then(obj => {
if (obj.options.clearAfterCopy) {
if (obj.options !== obj.options.clearAfterCopy) {
browser.storage.local.remove('urls');
}
}).then(notification('notificationStorageCopied'));
Expand Down

0 comments on commit 8f331cd

Please sign in to comment.