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

@@ -105,7 +105,7 @@ export default class Utility {
keys,
attribute = Utility.objectGet(/** @type {EntityConstructor} */(entity.constructor).attributes, keys)
) {
if (attribute.constructor === Object) {
if (attribute?.constructor === Object) {
return /** @type {TypeInformation} */(attribute).serialized
}
return false