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("@")
|
const [name, extend] = element.split("@")
|
||||||
if (name.startsWith("$")) return
|
if (name.startsWith("$")) return
|
||||||
if (name.startsWith("$")) return
|
|
||||||
childElement.push(name)
|
childElement.push(name)
|
||||||
const elementPath = `${prefix}${name}`
|
const elementPath = `${prefix}${name}`
|
||||||
let extendsName: string | undefined
|
let extendsName: string | undefined
|
||||||
|
|
@ -66,7 +65,7 @@ export function generateUIDefs(pack_folder: string) {
|
||||||
file,
|
file,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controls) {
|
if (controls && Array.isArray(controls)) {
|
||||||
const children = scanElement(
|
const children = scanElement(
|
||||||
controls.map((c: string) => Object.entries(c)[0]),
|
controls.map((c: string) => Object.entries(c)[0]),
|
||||||
`${prefix}${name}/`,
|
`${prefix}${name}/`,
|
||||||
|
|
@ -119,9 +118,7 @@ export function generateUIDefs(pack_folder: string) {
|
||||||
...elementsMap.get(name)!,
|
...elementsMap.get(name)!,
|
||||||
type: elementDefs.type,
|
type: elementDefs.type,
|
||||||
})
|
})
|
||||||
} else {
|
} else elementsMap.delete(name)
|
||||||
elementsMap.delete(name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Reference in a new issue