Fixed implicit throw annotation.
This commit is contained in:
parent
d4440e03cc
commit
c94cba560d
1 changed files with 6 additions and 2 deletions
|
@ -28,8 +28,8 @@ const MamiArgs = (argName, input, builder) => {
|
||||||
filter: undefined,
|
filter: undefined,
|
||||||
constraint: undefined,
|
constraint: undefined,
|
||||||
fallback: undefined,
|
fallback: undefined,
|
||||||
throw: true,
|
throw: undefined,
|
||||||
required: false,
|
required: undefined,
|
||||||
min: undefined,
|
min: undefined,
|
||||||
max: undefined,
|
max: undefined,
|
||||||
};
|
};
|
||||||
|
@ -79,6 +79,10 @@ const MamiArgs = (argName, input, builder) => {
|
||||||
required: value => {
|
required: value => {
|
||||||
checkCreated();
|
checkCreated();
|
||||||
info.required = value === undefined || value === true;
|
info.required = value === undefined || value === true;
|
||||||
|
|
||||||
|
if(info.required && info.throw === undefined)
|
||||||
|
info.throw = true;
|
||||||
|
|
||||||
return blueprint;
|
return blueprint;
|
||||||
},
|
},
|
||||||
min: value => {
|
min: value => {
|
||||||
|
|
Loading…
Reference in a new issue