Prevent error from unexpected attribute

This commit is contained in:
barsdeveloper
2023-01-04 22:16:51 +01:00
parent 3c5017de91
commit af44de4539
10 changed files with 65 additions and 39 deletions

View File

@@ -127,7 +127,7 @@ export default class ISerializer {
showProperty(entity, object, attributeKey, attributeValue) {
const attributes = /** @type {EntityConstructor} */(this.entityType).attributes
const attribute = Utility.objectGet(attributes, attributeKey)
if (attribute.constructor === Object) {
if (attribute?.constructor === Object) {
if (attribute.ignored) {
return false
}