Skip to content

Commit

Permalink
Prevent undefined options error in background script (emberjs#732)
Browse files Browse the repository at this point in the history
```
Error in response to storage.get: TypeError: Cannot read property 'showTomster' of undefined
```
  • Loading branch information
lifeart authored and cyril-sf committed Mar 30, 2022
1 parent ff7d057 commit 27615cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skeletons/web-extension/background-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*/
function updateTabAction(tabId){
chrome.storage.sync.get("options", function(data) {
if (!data.options.showTomster) { return; }
if (!data.options || !data.options.showTomster) { return; }
chrome.pageAction.show(tabId);
setActionTitle(tabId);
});
Expand Down

0 comments on commit 27615cc

Please sign in to comment.