Remove unnecessary default attributes

This commit is contained in:
barsdeveloper
2024-10-16 20:52:27 +02:00
parent 404a2aed4f
commit a8d78483d5
8 changed files with 65 additions and 20 deletions

View File

@@ -107,9 +107,17 @@ export default class Grammar {
const attributeKey = attributeName.split(Configuration.keysSeparator)
const attributeValue = this.getAttribute(entityType, attributeKey)
const grammar = attributeValue ? attributeValue.grammar : IEntity.unknownEntityGrammar
const inlined = attributeKey.length > 1
return grammar.map(attributeValue =>
values => {
Utility.objectSet(values, attributeKey, attributeValue)
attributeKey.reduce(
(acc, cur, i) => {
acc[cur]["inlined"] = inlined && i < attributeKey.length - 1
return acc[cur]
},
values
)
handleObjectSet(values, attributeKey, attributeValue)
}
)