From 9bfa6b827bf34796b1590247723922721346ca10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sat, 18 May 2024 20:36:16 +0800 Subject: [PATCH] build: 1.3.5 --- src/onebot11/action/BaseAction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onebot11/action/BaseAction.ts b/src/onebot11/action/BaseAction.ts index e48fcdea..11000aa5 100644 --- a/src/onebot11/action/BaseAction.ts +++ b/src/onebot11/action/BaseAction.ts @@ -10,7 +10,7 @@ class BaseAction { PayloadSchema: any = undefined; protected async check(payload: PayloadType): Promise { 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[];