Skip to content

Commit

Permalink
fix: force boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Jun 29, 2023
1 parent 43c68a7 commit bcfea99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atomWithFormControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function atomWithFormControls<
const errorVals = get(errorsAtom);
const errLen = Object.keys(errorVals).filter((x) => errorVals[x]).length;
const validateAtomResult = get(formGroupAtomValues);
const isValid = validateAtomResult.isValid && errLen === 0;
const isValid = Boolean(validateAtomResult.isValid && errLen === 0);

// INTERNAL USECASE, AVOID USING IN YOUR OWN LIBS
const setter = atomOptions.setSelf;
Expand Down

0 comments on commit bcfea99

Please sign in to comment.