simple-graph-query 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48638,19 +48638,14 @@ class ForgeExprEvaluator extends AbstractParseTreeVisitor_1.AbstractParseTreeVis
|
|
|
48638
48638
|
}
|
|
48639
48639
|
// For string values, try to find the corresponding atom and return its label
|
|
48640
48640
|
if (typeof value === "string") {
|
|
48641
|
-
|
|
48642
|
-
|
|
48643
|
-
|
|
48644
|
-
|
|
48645
|
-
// If the atom has a label field, return it; otherwise return the ID
|
|
48646
|
-
return atom.label !== undefined ? atom.label : atom.id;
|
|
48647
|
-
}
|
|
48648
|
-
}
|
|
48641
|
+
let atom = this.instanceData.getAtoms().find((a) => a.id === value);
|
|
48642
|
+
if (atom) {
|
|
48643
|
+
// If the atom has a label field, return it; otherwise return the ID
|
|
48644
|
+
return atom.label !== undefined ? atom.label : atom.id;
|
|
48649
48645
|
}
|
|
48650
|
-
// If no atom found, the value itself is the label (for string literals)
|
|
48651
|
-
return value;
|
|
48652
48646
|
}
|
|
48653
48647
|
// Fallback: return the value itself
|
|
48648
|
+
console.error(`No atom found for value: ${value}`);
|
|
48654
48649
|
return value;
|
|
48655
48650
|
}
|
|
48656
48651
|
// helper function
|
package/package.json
CHANGED