From 877bf98618ba4f8c2dfdb6a82459a98816062112 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 31 Dec 2014 08:58:06 +0000 Subject: Simplify search engine logic. --- background_scripts/completion.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 5cab54ed..d6402019 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -344,7 +344,7 @@ class SearchEngineCompleter this.searchEngines = root.Settings.getSearchEngines() getSearchEngineMatches: (queryTerms) -> - if 1 < queryTerms.length and engine = @searchEngines[queryTerms[0]] then engine else {} + (1 < queryTerms.length and @searchEngines[queryTerms[0]]) or {} # A completer which calls filter() on many completers, aggregates the results, ranks them, and returns the top # 10. Queries from the vomnibar frontend script come through a multi completer. -- cgit v1.2.3