Small serialization fixes

This commit is contained in:
barsdeveloper
2024-09-08 23:20:07 +02:00
parent 19ef3bd10e
commit 4601c9dc48
6 changed files with 38 additions and 8 deletions

View File

@@ -49,7 +49,11 @@ export default class ObjectReferenceEntity extends IEntity {
super()
this.#type = type
this.#path = path
this.#full = full ?? `"${this.type + (this.path ? (`'${this.path}'`) : "")}"`
this.#full = full ?? (
this.type.includes("/") || this.path
? `"${this.type + (this.path ? (`'${this.path}'`) : "")}"`
: this.type
)
}
/** @returns {P<ObjectReferenceEntity>} */
@@ -89,7 +93,7 @@ export default class ObjectReferenceEntity extends IEntity {
}
static createNoneInstance() {
return new ObjectReferenceEntity("None")
return new ObjectReferenceEntity("None", "", "None")
}
getName(dropCounter = false) {