From a123a6838fbebd8394dde4e4abc6a965153d314b Mon Sep 17 00:00:00 2001 From: Hernan Najles Date: Thu, 31 Aug 2023 17:07:53 -0300 Subject: [PATCH] W-13823763: fix id processing for shape debug info --- .../main/scala/amf/core/client/scala/model/domain/Shape.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/src/main/scala/amf/core/client/scala/model/domain/Shape.scala b/shared/src/main/scala/amf/core/client/scala/model/domain/Shape.scala index e80506321a..b40e5e5e4b 100644 --- a/shared/src/main/scala/amf/core/client/scala/model/domain/Shape.scala +++ b/shared/src/main/scala/amf/core/client/scala/model/domain/Shape.scala @@ -30,10 +30,11 @@ abstract class Shape if (!compactId) this.id else { val start = this.id.indexOf("#") - this.id.substring(start) + if (start < 0) this.id else this.id.substring(start) } s"$clazz@$memoryAddress: $id" } + override protected def nameField: Field = Name def displayName: StrField = fields.field(DisplayName)