aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-02-16 14:12:16 +0000
committerStephen Blott2016-02-16 14:12:16 +0000
commit8e3ac1867b7577814865bf1cb40d0b865de30b1a (patch)
tree53279879b1549a597b71de93530d0feb8ab6f044 /background_scripts/completion.coffee
parentceada9cdf8cb97c35b4871553e3c8b642c4806ef (diff)
parent56fed2ac6663d99ca03023f3ffa313c51de5fe32 (diff)
downloadvimium-8e3ac1867b7577814865bf1cb40d0b865de30b1a.tar.bz2
Merge pull request #1994 from mrmr1993/correct-loop-types-2
Use `for own ... of` instead of `for ... of`
Diffstat (limited to 'background_scripts/completion.coffee')
-rw-r--r--background_scripts/completion.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index c880a26c..47cc2a23 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -301,7 +301,7 @@ class DomainCompleter
performSearch: (queryTerms, onComplete) ->
query = queryTerms[0]
- domains = (domain for domain of @domains when 0 <= domain.indexOf query)
+ domains = (domain for own domain of @domains when 0 <= domain.indexOf query)
domains = @sortDomainsByRelevancy queryTerms, domains
onComplete [
new Suggestion
@@ -439,7 +439,7 @@ class SearchEngineCompleter
if queryTerms.length == 0
[]
else
- for _, suggestion of @previousSuggestions[searchUrl]
+ for own _, suggestion of @previousSuggestions[searchUrl]
continue unless RankingUtils.matches queryTerms, suggestion.title
# Reset various fields, they may not be correct wrt. the current query.
extend suggestion, relevancy: null, html: null, queryTerms: queryTerms
@@ -507,7 +507,7 @@ class SearchEngineCompleter
postProcessSuggestions: (request, suggestions) ->
return unless request.searchEngines
- engines = (engine for _, engine of request.searchEngines)
+ engines = (engine for own _, engine of request.searchEngines)
engines.sort (a,b) -> b.searchUrl.length - a.searchUrl.length
engines.push keyword: null, description: "search history", searchUrl: Settings.get "searchUrl"
for suggestion in suggestions