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

Commit

Permalink
Merge pull request #346 from Bayer-Group/HOTFIX-layer-panel
Browse files Browse the repository at this point in the history
pass empty array instead of undefined for features from layer
  • Loading branch information
stazrad authored Sep 21, 2021
2 parents e7301ce + 957c59a commit a67ea18
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bayer/ol-kit",
"version": "1.14.0",
"version": "1.14.1",
"license": "BSD",
"description": "Mapping components & utils built with openlayers + react",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/Draw/__snapshots__/DrawContainer.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`<DrawContainer /> should render a basic prebuilt DrawContainer componen
class=\\"sc-gtssRu fBppYk\\"
href=\\"https://ol-kit.com/\\"
target=\\"_blank\\"
title=\\"Powered by ol-kit v1.14.0\\"
title=\\"Powered by ol-kit v1.14.1\\"
>
<svg
viewBox=\\"0 0 204.76 236.44\\"
Expand Down
4 changes: 2 additions & 2 deletions src/LayerPanel/LayerPanelLayersPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ class LayerPanelLayersPage extends PureComponent {
}

getFeaturesForLayer = (layer) => {
if (!this.isValidVectorLayer(layer)) return
if (this.props.shouldHideFeatures(layer)) return
if (!this.isValidVectorLayer(layer)) return []
if (this.props.shouldHideFeatures(layer)) return []

return layer.getSource().getFeatures().map(feature => {
const isVisible = feature.get('_ol_kit_feature_visibility') === undefined ? true : feature.get('_ol_kit_feature_visibility')
Expand Down

0 comments on commit a67ea18

Please sign in to comment.