fix: 修复 editor 合入后导致插件配置项失效问题 (#6800)

This commit is contained in:
liaoxuezhi 2023-05-06 16:12:26 +08:00 committed by GitHub
parent 288d7bcc79
commit 4ce72f5986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}) || []
);
}