Small fix

This commit is contained in:
barsdeveloper
2023-05-06 21:57:25 +02:00
parent e97ce5d562
commit a80bf61c88
7 changed files with 16 additions and 8 deletions

View File

@@ -213,7 +213,7 @@ export default class Configuration {
static subObjectAttributeNamePrefix = "#SubObject"
/** @param {ObjectEntity} objectEntity */
static subObjectAttributeNameFromEntity = (objectEntity, nameOnly = false) =>
this.subObjectAttributeNamePrefix + (!nameOnly && objectEntity.Class?.path ? `_${objectEntity.Class.path}` : "")
this.subObjectAttributeNamePrefix + (!nameOnly && objectEntity.Class ? `_${objectEntity.Class}` : "")
+ `_${objectEntity.Name}`
/** @param {ObjectReferenceEntity} objectReferenceEntity */
static subObjectAttributeNameFromReference = (objectReferenceEntity, nameOnly = false) =>

View File

@@ -49,4 +49,8 @@ export default class ObjectReferenceEntity extends IEntity {
getName() {
return Utility.getNameFromPath(this.path)
}
toString() {
return `${this.type}'"${this.path}"'`
}
}

View File

@@ -492,8 +492,8 @@ export default class Grammar {
P.alt(
this.noneReferenceEntity,
this.fullReferenceEntity,
this.pathReferenceEntity,
this.typeReferenceEntity,
this.pathReferenceEntity,
)
)

View File

@@ -76,7 +76,7 @@ export default class PinTemplate extends ITemplate {
}
renderIcon() {
switch (this.element.entity.PinType.ContainerType.toString()) {
switch (this.element.entity.PinType.ContainerType?.toString()) {
case "Array": return SVGIcon.array
case "Set": return SVGIcon.set
case "Map": return SVGIcon.map