@bian-womp/spark-graph 0.3.35 → 0.3.36

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.
package/lib/cjs/index.cjs CHANGED
@@ -1842,8 +1842,6 @@ class HandleResolver {
1842
1842
  if ((this.recomputeTokenByNode.get(nodeId) ?? 0) !== token)
1843
1843
  return;
1844
1844
  const before = this.graph.getResolvedHandles(nodeId);
1845
- if (!before)
1846
- return;
1847
1845
  // Re-fetch desc to ensure we have the latest (node might have been updated)
1848
1846
  const nodeDesc = this.registry.nodes.get(node.typeId);
1849
1847
  if (!nodeDesc)
@@ -1872,8 +1870,9 @@ class HandleResolver {
1872
1870
  ...resolved?.inputDefaults,
1873
1871
  };
1874
1872
  const after = { inputs, outputs, inputDefaults };
1875
- // Compare shallow-structurally via JSON
1876
- if (JSON.stringify(before) === JSON.stringify(after))
1873
+ // If we have prior handles, skip update when unchanged; for new nodes (no before),
1874
+ // always write the resolved handles.
1875
+ if (before && JSON.stringify(before) === JSON.stringify(after))
1877
1876
  return;
1878
1877
  // Call GraphRuntime's updateNodeHandles to update edges and re-propagate values
1879
1878
  // Note: updateNodeHandles will set the resolved handles internally