Permalink
Browse files

Looks like missing parentheses.

This is looks wrong, and is inconsistent with the way the equivalent
calculation is handled elsewhere.

This commit fixes it.
  • Loading branch information...
smblott-github committed Nov 5, 2012
1 parent c0b317a commit 450f0ec3e105a3c0eeeeac1fc2c9d58c2fc88597
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 450f0ec

Please sign in to comment.