diff options
Diffstat (limited to 'ext/bg/js')
-rw-r--r-- | ext/bg/js/query-parser.js | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/ext/bg/js/query-parser.js b/ext/bg/js/query-parser.js index fced2bda..ea215582 100644 --- a/ext/bg/js/query-parser.js +++ b/ext/bg/js/query-parser.js @@ -82,22 +82,15 @@ class QueryParser extends EventDispatcher { // Private - _onSearched({type, definitions, sentence, inputInfo, textSource, optionsContext, detail, error}) { + _onSearched(e) { + const {error} = e; if (error !== null) { yomichan.logError(error); return; } - if (type === null) { return; } - - this.trigger('searched', { - type, - definitions, - sentence, - inputInfo, - textSource, - optionsContext, - detail - }); + if (e.type === null) { return; } + + this.trigger('searched', e); } _onParserChange(e) { |