From 4ce72f59867ef2b1fb329704e544c96f88214426 Mon Sep 17 00:00:00 2001 From: liaoxuezhi <2betop.cn@gmail.com> Date: Sat, 6 May 2023 16:12:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20editor=20=E5=90=88?= =?UTF-8?q?=E5=85=A5=E5=90=8E=E5=AF=BC=E8=87=B4=E6=8F=92=E4=BB=B6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98=20(#6800?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-editor-core/src/manager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/amis-editor-core/src/manager.ts b/packages/amis-editor-core/src/manager.ts index 67becb245..d2219d4fc 100644 --- a/packages/amis-editor-core/src/manager.ts +++ b/packages/amis-editor-core/src/manager.ts @@ -338,7 +338,9 @@ export class EditorManager { ) { return ( plugins?.map(klass => { + let options: any; if (Array.isArray(klass)) { + options = klass[1]; klass = klass[0]; } @@ -347,7 +349,7 @@ export class EditorManager { new Set(['global'].concat(klass.scene || 'global')) ); klass.scene = scene; - return klass; + return options ? [klass, options] : klass; }) || [] ); }