Skip to content

Commit

Permalink
joi: Remove unnecessary parentheses (DefinitelyTyped#18799)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy authored Aug 9, 2017
1 parent 54f92d3 commit 3b31f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/joi/joi-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ const Joi3 = Joi.extend({
const fIsAllowed = params.allowF;
},
validate (params, value, state, options) {
if (value === 'asd' && (params.allowF && value === 'asdf')) {
if (value === 'asd' || params.allowF && value === 'asdf') {
return value;
}
return this.createError('asd', { v: value }, state, options);
Expand Down

0 comments on commit 3b31f6b

Please sign in to comment.