Merge pull request #71 from 502647092/patch-1

fix: 修复JSON导入错误
pull/76/head
Bosn 7 years ago committed by GitHub
commit 8ab12c86af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,7 +77,7 @@ class Importer extends Component {
}
let value = /Array|Object/.test(type) ? '' : schema.template
if (schema.items.length) {
if (schema.items && schema.items.length) {
let childType = schema.items[0].type
if (['number', 'null', 'undefined', 'boolean', 'string'].indexOf(childType) > -1) {
value = JSON.stringify(schema.template)

Loading…
Cancel
Save