From 0623b35f3a73fb152c1c5009c6e2d2ed39a0417b Mon Sep 17 00:00:00 2001
From: Jonathan-Casey <109082377+Jonathan-Casey@users.noreply.github.com>
Date: Wed, 30 Aug 2023 16:26:38 +0100
Subject: [PATCH] feat(maps): assign key type from ast (#698)

Signed-off-by: jonathan.casey <jonathan.casey@docusign.com>
---
 packages/concerto-core/lib/introspect/mapkeytype.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/packages/concerto-core/lib/introspect/mapkeytype.js b/packages/concerto-core/lib/introspect/mapkeytype.js
index 81f647711..74e79d876 100644
--- a/packages/concerto-core/lib/introspect/mapkeytype.js
+++ b/packages/concerto-core/lib/introspect/mapkeytype.js
@@ -102,8 +102,7 @@ class MapKeyType extends Decorated {
             this.type = 'String';
             break;
         case `${MetaModelNamespace}.ObjectMapKeyType`:
-            decl = this.parent.getModelFile().getAllDeclarations().find(d => d.name === this.ast.type.name);
-            this.type = decl.getName();
+            this.type = String(this.ast.type.name);
             break;
         }
     }