From 0b75a704d2dbe7d246d9a89a271dd95836666a22 Mon Sep 17 00:00:00 2001
From: Yury <rip95_95@mail.ru>
Date: Sun, 22 Aug 2021 21:40:49 +0300
Subject: [PATCH] fix: Fix type references with graph evaluation

---
 src/PropertyShapeDocument.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/PropertyShapeDocument.js b/src/PropertyShapeDocument.js
index a920162..70a0adc 100644
--- a/src/PropertyShapeDocument.js
+++ b/src/PropertyShapeDocument.js
@@ -499,19 +499,19 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
       dElm[0],
       this.ns.aml.vocabularies.docSourceMaps.element
     );
-    this._targetTypeId = id;
     const type = this._getType(amf, id);
     if (!type) {
       return;
     }
 
+    this._targetTypeId = id;
     this._targetTypeName = this._getValue(type, this.ns.w3.shacl.name);
   }
 
   _getType(amf, id) {
-    const dcs = this._computeDeclares(amf);
-    let refs; // this._computeReferences(amf);
-    return this._computeType(dcs, refs, id);
+    const declares = this._computeDeclares(amf);
+    const refs = this._computeReferences(amf);
+    return this._computeType(declares, refs, id);
   }
 
   _navigateType() {