Skip to content

Commit

Permalink
Merge pull request #368 from dhis2/fix/undefined-demourl
Browse files Browse the repository at this point in the history
fix: prevent crash when saving an unedited version
  • Loading branch information
Erik A authored Sep 1, 2020
2 parents 4df66ea + 572cd2d commit f1f4e7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/components/appVersion/VersionListEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ class VersionListEdit extends Component {
}

handleSubmitRow(version) {
//if nothing was changed, just behave the same way as clicking cancel
if (!this.state.editedValues[version.id]) {
this.handleCancelRow(version)
return
}

const errors = validate(this.state.editedValues[version.id])

if (Object.keys(errors).length > 0) {
Expand Down

0 comments on commit f1f4e7a

Please sign in to comment.