Use consistent structure for params

This commit is contained in:
toasted-nutbread 2019-09-06 21:07:29 -04:00
parent 13b184707b
commit 7db2c66105
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class Backend {
const callback = () => this.checkLastError(chrome.runtime.lastError);
chrome.tabs.query({}, tabs => {
for (const tab of tabs) {
chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, callback);
chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: {options}}, callback);
}
});
}

View File

@ -261,7 +261,7 @@ class Frontend {
onBgMessage({action, params}, sender, callback) {
const handlers = {
optionsSet: options => {
optionsSet: ({options}) => {
this.options = options;
if (!this.options.enable) {
this.searchClear();