Fix keys order for unknown values

This commit is contained in:
barsdeveloper
2022-04-12 23:07:06 +02:00
parent f71edf1a3c
commit f29119809f
4 changed files with 59 additions and 3 deletions

View File

@@ -24,7 +24,10 @@ export default class IEntity {
const defineAllAttributes = (prefix, target, properties, values) => {
let fullKey = prefix.concat("")
const last = fullKey.length - 1
for (let property of Object.getOwnPropertyNames(properties)) {
for (let property of Utility.mergeArrays(
Object.getOwnPropertyNames(properties),
Object.getOwnPropertyNames(values ?? {})
)) {
fullKey[last] = property
let defaultValue = properties[property]
const defaultType = (defaultValue instanceof TypeInitialization)