Skip to content

Commit

Permalink
Clean up unused manifest property + prevent error in storage lookup (e…
Browse files Browse the repository at this point in the history
…mberjs#899)

* remove unused 'browser_style' in metadata's 'options_ui'

https://developer.chrome.com/extensions/options#embedded_options

* prevent property lookup on undefined option data hash
  • Loading branch information
22a authored and cyril-sf committed Mar 30, 2022
1 parent a13a8f1 commit 5b41fe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions skeletons/web-extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
],

"options_ui": {
"page": "options-dialog.html",
"browser_style": true
"page": "options-dialog.html"
}
}
2 changes: 1 addition & 1 deletion skeletons/web-extension/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
chrome.storage.sync.get('options', function(data) {
var options = data.options;

document.querySelector('[data-settings=tomster]').checked = options.showTomster;
document.querySelector('[data-settings=tomster]').checked = options && options.showTomster;
});
}

Expand Down

0 comments on commit 5b41fe8

Please sign in to comment.