From 7db2c661054113966644c9055e5b60e29bbeb068 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 6 Sep 2019 21:07:29 -0400 Subject: [PATCH] Use consistent structure for params --- ext/bg/js/backend.js | 2 +- ext/fg/js/frontend.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index c1cef0c5..f05ae9e6 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -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); } }); } diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index b70bf036..6806e2c3 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -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();