fix: 兼容 setters 为空的情况

This commit is contained in:
LeoYuan 袁力皓 2022-02-18 19:48:57 +08:00
parent a76618c858
commit 56b459a017

View File

@ -113,7 +113,8 @@ class SettingFieldView extends Component<SettingFieldViewProps, SettingFieldView
const supportVariableGlobally = engineConfig.get('supportVariableGlobally', false) && isStandardComponent(componentMeta);
if (supportVariable || supportVariableGlobally) {
if (setterType === 'MixedSetter') {
if (!setterProps.setters.includes('VariableSetter')) {
// VariableSetter 不单独使用
if (Array.isArray(setterProps.setters) && !setterProps.setters.includes('VariableSetter')) {
setterProps.setters.push('VariableSetter');
}
} else {