fix(amis-editor): AMisCodeEditor格式校验支持数组类JSON

This commit is contained in:
wibetter 2023-07-28 10:38:54 +08:00
parent faed382e69
commit 8623f5f711

View File

@ -159,7 +159,7 @@ export default class AMisCodeEditor extends React.Component<AMisCodeEditorProps>
const {onChange, value} = this.props;
let ret: any = this.str2obj(this.state.contents);
if (!ret || !isPlainObject(ret)) {
if (!ret || (!isPlainObject(ret) && !isArray(ret))) {
this.setState({
wrongSchema: this.state.contents
});