Skip to content

Commit 56b459a

Browse files
committed
fix: 兼容 setters 为空的情况
1 parent a76618c commit 56b459a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/editor-skeleton/src/components/settings/settings-pane.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ class SettingFieldView extends Component<SettingFieldViewProps, SettingFieldView
113113
const supportVariableGlobally = engineConfig.get('supportVariableGlobally', false) && isStandardComponent(componentMeta);
114114
if (supportVariable || supportVariableGlobally) {
115115
if (setterType === 'MixedSetter') {
116-
if (!setterProps.setters.includes('VariableSetter')) {
116+
// VariableSetter 不单独使用
117+
if (Array.isArray(setterProps.setters) && !setterProps.setters.includes('VariableSetter')) {
117118
setterProps.setters.push('VariableSetter');
118119
}
119120
} else {

0 commit comments

Comments
 (0)