Skip to content

Commit

Permalink
Check for boolean input values
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jul 31, 2023
1 parent 024d210 commit a4079d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function Form(props) {

// We want to initialize the input value if it's undefined
if (_.isUndefined(inputValues[inputID])) {
inputValues[inputID] = defaultValue || '';
inputValues[inputID] = _.isBoolean(defaultValue) ? defaultValue : defaultValue || '';
}

// We force the form to set the input value from the defaultValue props if there is a saved valid value
Expand Down

0 comments on commit a4079d0

Please sign in to comment.