Fix object newline when missing custom properties

This commit is contained in:
barsdeveloper
2024-09-08 12:12:58 +02:00
parent 23ee628e28
commit c246c82bfe
3 changed files with 7 additions and 9 deletions

View File

@@ -41,7 +41,6 @@ export default class ObjectEntity extends IEntity {
static printKey = k => !k.startsWith(Configuration.subObjectAttributeNamePrefix) ? k : ""
static attributeSeparator = "\n"
static wrap = this.notWrapped
static trailing = true
static attributes = {
...super.attributes,
Class: ObjectReferenceEntity,
@@ -696,14 +695,14 @@ export default class ObjectEntity extends IEntity {
+ (Self.attributes.CustomProperties.ignored !== true && this.CustomProperties.ignored !== true
? this.getCustomproperties().map(pin =>
deeperIndentation
+ attributeSeparator
+ printKey("CustomProperties ")
+ pin.serialize(insideString)
).join(Self.attributeSeparator)
).join("")
: ""
)
+ attributeSeparator
+ indentation + "End Object"
+ (this.trailing ? attributeSeparator : "")
+ indentation + "End Object\n"
return result
}
}