Skip to content

Commit

Permalink
Prevent undefined options error in background script (#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 teddyzeenny committed Nov 7, 2017
1 parent 845b80a commit b306318
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 b306318

Please sign in to comment.