From 450f0ec3e105a3c0eeeeac1fc2c9d58c2fc88597 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 5 Nov 2012 15:13:44 +0000 Subject: Looks like missing parentheses. This is looks wrong, and is inconsistent with the way the equivalent calculation is handled elsewhere. This commit fixes it. --- 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 9e12d497..e959d358 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -171,7 +171,7 @@ class DomainCompleter for domain in domainCandidates recencyScore = RankingUtils.recencyScore(@domains[domain].lastVisitTime || 0) wordRelevancy = RankingUtils.wordRelevancy(queryTerms, domain, null) - score = wordRelevancy + Math.max(recencyScore, wordRelevancy) / 2 + score = (wordRelevancy + Math.max(recencyScore, wordRelevancy)) / 2 results.push([domain, score]) results.sort (a, b) -> b[1] - a[1] results -- cgit v1.2.3