build: 1.3.5
This commit is contained in:
1 parent
0c23288e85
commit
d9a22c12fc
1 file changed
+1
-1
@@ -10,7 +10,7 @@ class BaseAction<PayloadType, ReturnDataType> {
|
||||
PayloadSchema: any = undefined;
|
||||
protected async check(payload: PayloadType): Promise<BaseCheckResult> {
|
||||
if (this.PayloadSchema) {
|
||||
this.validate = new Ajv().compile(this.PayloadSchema);
|
||||
this.validate = new Ajv({ allowUnionTypes: true }).compile(this.PayloadSchema);
|
||||
}
|
||||
if (this.validate && !this.validate(payload)) {
|
||||
const errors = this.validate.errors as ErrorObject[];
|
||||
|
||||
Reference in new issue
Block a user