@bian-womp/spark-workbench 0.2.11 → 0.2.12

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
@@ -2900,7 +2900,7 @@ function WorkbenchStudioCanvas({ setRegistry, autoScroll, onAutoScrollChange, ex
2900
2900
  const positions = parsed.positions || {};
2901
2901
  const environment = parsed.environment || {};
2902
2902
  const inputs = parsed.inputs || {};
2903
- if (def) {
2903
+ if (def && runner.isRunning()) {
2904
2904
  // Remote exact restore path
2905
2905
  await runner.applySnapshotFull({
2906
2906
  def,
@@ -2912,6 +2912,9 @@ function WorkbenchStudioCanvas({ setRegistry, autoScroll, onAutoScrollChange, ex
2912
2912
  if (positions && typeof positions === "object")
2913
2913
  wb.setPositions(positions);
2914
2914
  }
2915
+ else {
2916
+ alert("Graph definition is empty or engine is not running");
2917
+ }
2915
2918
  }
2916
2919
  else {
2917
2920
  const def = parsed?.def ?? parsed;