Skip to content

Commit

Permalink
Fix crash when no features picked in feature form
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jan 9, 2025
1 parent 0b14a56 commit db8f6e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qwc2",
"version": "2025.01.08-master",
"version": "2025.01.09-master",
"description": "QGIS Web Client 2 core",
"author": "Sourcepole AG",
"license": "BSD-2-Clause",
Expand Down
2 changes: 1 addition & 1 deletion plugins/FeatureForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class FeatureForm extends React.Component {
});
} else {
this.setState((state) => {
const selectedFeature = state.pendingRequests <= 1 && !state.selectedFeature ? Object.keys(state.pickedFeatures)[0] : "";
const selectedFeature = state.pendingRequests <= 1 && !state.selectedFeature ? (Object.keys(state.pickedFeatures)[0] ?? "") : "";
return {
pendingRequests: state.pendingRequests - 1,
selectedFeature: selectedFeature
Expand Down

0 comments on commit db8f6e6

Please sign in to comment.