Fix list props (#2623)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-02-13 08:35:29 +06:00 committed by GitHub
parent f20bdccbbe
commit e90b8c74bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,11 @@
}
function joinProps (attribute: AttributeModel, object: Doc, props: Record<string, any>) {
const { listProps, ...clearAttributeProps } = attribute.props as any
let clearAttributeProps = attribute.props
if (attribute.props?.listProps !== undefined) {
const { listProps, ...other } = attribute.props as any
clearAttributeProps = other
}
if (attribute.attribute?.type._class === core.class.EnumOf) {
return { ...clearAttributeProps, type: attribute.attribute.type, ...props }
}