fix controls is not array
This commit is contained in:
parent
69a54ace0b
commit
d02d0469c3
1 changed files with 2 additions and 5 deletions
|
|
@ -45,7 +45,6 @@ export function generateUIDefs(pack_folder: string) {
|
|||
|
||||
const [name, extend] = element.split("@")
|
||||
if (name.startsWith("$")) return
|
||||
if (name.startsWith("$")) return
|
||||
childElement.push(name)
|
||||
const elementPath = `${prefix}${name}`
|
||||
let extendsName: string | undefined
|
||||
|
|
@ -66,7 +65,7 @@ export function generateUIDefs(pack_folder: string) {
|
|||
file,
|
||||
}
|
||||
|
||||
if (controls) {
|
||||
if (controls && Array.isArray(controls)) {
|
||||
const children = scanElement(
|
||||
controls.map((c: string) => Object.entries(c)[0]),
|
||||
`${prefix}${name}/`,
|
||||
|
|
@ -119,9 +118,7 @@ export function generateUIDefs(pack_folder: string) {
|
|||
...elementsMap.get(name)!,
|
||||
type: elementDefs.type,
|
||||
})
|
||||
} else {
|
||||
elementsMap.delete(name)
|
||||
}
|
||||
} else elementsMap.delete(name)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Reference in a new issue