Skip to content

Commit

Permalink
fix(editor): Cap NDV Output View Tab Index to prevent rare edge case (n…
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieKolb authored Nov 8, 2024
1 parent d17d76a commit a6c8ee4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/editor-ui/src/components/RunData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ const currentOutputIndex = computed(() => {
return props.overrideOutputs[0];
}
return outputIndex.value;
// In some cases nodes may switch their outputCount while the user still
// has a higher outputIndex selected. We could adjust outputIndex directly,
// but that loses data as we can keep the user selection if the branch reappears.
return Math.min(outputIndex.value, maxOutputIndex.value);
});
const branches = computed(() => {
const capitalize = (name: string) => name.charAt(0).toLocaleUpperCase() + name.slice(1);
Expand Down

0 comments on commit a6c8ee4

Please sign in to comment.