From 4e5e862f5834ad180e4428959c272d444a6f78ab Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Jul 2025 23:31:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8F=92=E4=BB=B6onlyAdmin=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/pipeline/src/plugin/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/pipeline/src/plugin/api.ts b/packages/core/pipeline/src/plugin/api.ts index 4598a6a9..eee946f7 100644 --- a/packages/core/pipeline/src/plugin/api.ts +++ b/packages/core/pipeline/src/plugin/api.ts @@ -165,7 +165,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin { this.registerSecret(cert.one); } - if (this.ctx.define.onlyAdmin) { + if (this.ctx?.define?.onlyAdmin) { if (!this.isAdmin()) { throw new Error("只有管理员才能运行此任务"); }