Skip to content

Commit

Permalink
Fix access to possibly null theme.predefinedFilters
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Mar 5, 2024
1 parent 4ce210e commit d2d13d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/ThemeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const ThemeUtils = {
featureInfoUrl: ThemeUtils.inheritBaseUrlParams(theme.featureInfoUrl, theme.url, baseParams),
infoFormats: theme.infoFormats,
layerTreeHiddenSublayers: theme.layerTreeHiddenSublayers,
predefinedFilters: theme.predefinedFilters.filter(entry => Object.keys(entry.filter).find(name => sublayerNames.includes(name))),
predefinedFilters: (theme.predefinedFilters || []).filter(entry => Object.keys(entry.filter).find(name => sublayerNames.includes(name))),
externalLayerMap: {
...theme.externalLayerMap,
...(theme.externalLayers || []).reduce((res, cur) => {
Expand Down

0 comments on commit d2d13d9

Please sign in to comment.