Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix search suggestions
Browse files Browse the repository at this point in the history
Follow up to b1bbeff

Auditors: @bsclifton
  • Loading branch information
bbondy committed Jan 14, 2017
1 parent 03a9f91 commit dc4f0fd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/renderer/reducers/urlBarSuggestionsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ const generateNewSuggestionsList = (state) => {
const activeFrameKey = state.get('activeFrameKey')
const urlLocation = state.getIn(activeFrameStatePath(state).concat(['navbar', 'urlbar', 'location']))
const sites = appStoreRenderer.state.get('sites')
const searchResults = activeFrameStatePath(state).concat(['navbar', 'urlbar', 'suggestions', 'searchResults'])
const frameSearchDetail = activeFrameStatePath(state).concat(['navbar', 'urlbar', 'searchDetail'])
const searchResults = state.getIn(activeFrameStatePath(state).concat(['navbar', 'urlbar', 'suggestions', 'searchResults']))
const frameSearchDetail = state.getIn(activeFrameStatePath(state).concat(['navbar', 'urlbar', 'searchDetail']))
const searchDetail = state.get('searchDetail')

if (!urlLocation) {
Expand All @@ -137,7 +137,9 @@ const generateNewSuggestionsList = (state) => {
const defaultme = (x) => x
const mapListToElements = ({data, maxResults, type, clickHandler = navigateSiteClickHandler.bind(this),
sortHandler = defaultme, formatTitle = defaultme, formatUrl = defaultme,
filterValue = (site) => site.toLowerCase().includes(urlLocationLower)
filterValue = (site) => {
return site.toLowerCase().includes(urlLocationLower)
}
}) => // Filter out things which are already in our own list at a smaller index
data
// Per suggestion provider filter
Expand Down

0 comments on commit dc4f0fd

Please sign in to comment.