Skip to content

Commit

Permalink
fix(validator): boolean validator
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and AliMD committed Jan 3, 2023
1 parent af237db commit 593b4a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/validator/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function validator<DataType extends Record<string, unknown>>(value: Record<strin

if (valueType === 'boolean') {
if (validValue === true || validValue === false) {
value[paramName] = true;
value[paramName] = validValue;
}
else {
throw new Error('invalid_type', {
Expand Down

0 comments on commit 593b4a4

Please sign in to comment.