feat(Switch Node): Overhaul (#7855)

Github issue / Community forum post (link here to close automatically):
https://community.n8n.io/t/switch-node-to-more-than-one-path/32791/2

https://community.n8n.io/t/switch-node-routing-same-value-multiple-output/29424

---------

Co-authored-by: Elias Meire <elias@meire.dev>
Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
Michael Kret
2024-01-04 11:03:03 +02:00
committed by GitHub
parent cd3f5b5b1f
commit f4092a9e49
11 changed files with 860 additions and 8 deletions

View File

@@ -644,6 +644,8 @@ export class SwitchV2 implements INodeType {
const rules = this.getNodeParameter('rules.rules', itemIndex, []) as INodeParameters[];
mode = this.getNodeParameter('mode', itemIndex) as string;
item.pairedItem = { item: itemIndex };
if (mode === 'expression') {
const outputsAmount = this.getNodeParameter('outputsAmount', itemIndex) as number;
if (itemIndex === 0) {