footprint-explainable-ui 0.14.10 → 0.15.0

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.
@@ -840,9 +840,14 @@ function applyOverlay(layout, overlay, colors) {
840
840
  if (le.isLoop) {
841
841
  let loopExecuted = false;
842
842
  if (o?.executionOrder) {
843
- const lastSourceIdx = o.executionOrder.lastIndexOf(le.source);
844
- if (lastSourceIdx >= 0) {
845
- loopExecuted = o.executionOrder.slice(lastSourceIdx + 1).includes(le.target);
843
+ if (le.source === le.target) {
844
+ const count = o.executionOrder.filter((id) => id === le.source).length;
845
+ loopExecuted = count > 1;
846
+ } else {
847
+ const lastSourceIdx = o.executionOrder.lastIndexOf(le.source);
848
+ if (lastSourceIdx >= 0) {
849
+ loopExecuted = o.executionOrder.slice(lastSourceIdx + 1).includes(le.target);
850
+ }
846
851
  }
847
852
  }
848
853
  edges.push({