Use consistent structure for params
This commit is contained in:
parent
13b184707b
commit
7db2c66105
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user