@esfaenza/flow-builder 20.3.19 → 20.3.20

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.
@@ -2264,15 +2264,19 @@ class FlowDocumentStore {
2264
2264
  FlowDocumentStore.clearReferencesTo(draft, name);
2265
2265
  });
2266
2266
  }
2267
- /** Azzera i connector che puntano a un node scomparso, Start compreso. */
2267
+ /** Toglie i connector che puntano a un node scomparso, Start compreso. */
2268
2268
  static clearReferencesTo(draft, removedName) {
2269
2269
  const visit = (type, node) => {
2270
2270
  for (const outlet of outletsOf(type, node)) {
2271
2271
  const connector = outlet.read(node);
2272
2272
  if (connector?.targetReference === removedName) {
2273
- // Il ramo resta, senza destinazione: e' un ramo incompleto, non un errore
2274
- // di riferimento. La UI lo mostra come tale (§6.4, `to: null`).
2275
- outlet.write(node, { ...connector, targetReference: undefined });
2273
+ // Il ramo resta (e' un'uscita dell'elemento), il **connector** no: un connector
2274
+ // dichiarato senza destinazione e' `CONNECTOR_TARGET_MISSING`, cioe' un avviso
2275
+ // che resta lì per sempre dopo aver cancellato il node a valle. Un ramo senza
2276
+ // connector e' invece «il percorso finisce qui», che e' esattamente cio' che e'
2277
+ // successo. Stessa scelta di `setTarget`, e per la stessa ragione: `isGoTo` e'
2278
+ // un suggerimento di disegno sull'arco, e senza arco non ha niente da suggerire.
2279
+ outlet.write(node, undefined);
2276
2280
  }
2277
2281
  }
2278
2282
  };