mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
fix(amis-editor): AMisCodeEditor格式校验支持数组类JSON
This commit is contained in:
parent
faed382e69
commit
8623f5f711
@ -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
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user