From 0112dbab33ab214f9e1dc930558833956d4ad1c4 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Mon, 9 Mar 2020 04:06:31 +0200 Subject: [PATCH] fix searchQueryUpdate --- ext/bg/js/backend.js | 2 +- ext/bg/js/search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 6e5235ed..d0d53a36 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -695,7 +695,7 @@ class Backend { await Backend._focusTab(tab); if (queryParams.query) { await new Promise((resolve) => chrome.tabs.sendMessage( - tab.id, {action: 'searchQueryUpdate', params: {query: queryParams.query}}, resolve + tab.id, {action: 'searchQueryUpdate', params: {text: queryParams.query}}, resolve )); } return true; diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index f9481ea2..5881f6f8 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -56,7 +56,7 @@ class DisplaySearch extends Display { ]); this._runtimeMessageHandlers = new Map([ - ['searchQueryUpdate', ({query}) => { this.onExternalSearchUpdate(query); }] + ['searchQueryUpdate', this.onExternalSearchUpdate.bind(this)] ]); }