Skip to content

Commit

Permalink
Correctly pass themes to theme and theme layer search
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jan 13, 2025
1 parent 8912ffb commit fd6a744
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions selectors/searchproviders.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ function getResultGeometry(provider, item, callback) {
export default createSelector(
[
state => state.theme.current,
state => state.theme,
state => state.layers.flat,
state => state.map.scales,
state => state.map.zoom
], (theme, layers, scales, zoom) => {
], (theme, themes, layers, scales, zoom) => {
// Collect active layers/search terms
let searchTerms = [];
const activeLayers = [];
Expand Down Expand Up @@ -110,15 +111,15 @@ export default createSelector(
availableProviders.themes = {
labelmsgid: LocaleUtils.trmsg("search.themes"),
onSearch: (text, options, callback) => {
callback({results: ThemeUtils.searchThemes(theme.themes, text)});
callback({results: ThemeUtils.searchThemes(themes.themes, text)});
}
};
}
if (ConfigUtils.getConfigProp("searchThemeLayers", theme)) {
availableProviders.themelayers = {
labelmsgid: LocaleUtils.trmsg("search.themelayers"),
onSearch: (text, options, callback) => {
callback({results: ThemeUtils.searchThemeLayers(theme.themes, text)});
callback({results: ThemeUtils.searchThemeLayers(themes.themes, text)});
}
};
}
Expand Down

0 comments on commit fd6a744

Please sign in to comment.