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
- // Search through all types and atoms to find the matching atom ID
48642
- for (const type of this.instanceData.getTypes()) {
48643
- for (const atom of type.atoms) {
48644
- if (atom.id === value) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-graph-query",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "TypeScript evaluator for Forge expressions with browser-compatible UMD bundle",
5
5
  "main": "dist/simple-graph-query.bundle.js",
6
6
  "types": "dist/index.d.ts",