Skip to content

Commit

Permalink
fix: simpler logic
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-g committed May 24, 2024
1 parent 1011044 commit a2e203a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ValidityState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const reconcileValidity = (validityObject: ValidityState, newState: Parti
export const isValid = (validityState: Partial<ValidityState>): boolean => {
let valid = true;
for (let key in validityState) {
if (key !== 'valid' && (validityState[key] !== false && validityState[key] !== undefined)) {
if (key !== 'valid' && (validityState[key] === true)) {
valid = false;
}
}
Expand Down

0 comments on commit a2e203a

Please sign in to comment.