mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
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:
@@ -3,6 +3,7 @@ import { VersionedNodeType } from 'n8n-workflow';
|
||||
|
||||
import { SwitchV1 } from './V1/SwitchV1.node';
|
||||
import { SwitchV2 } from './V2/SwitchV2.node';
|
||||
import { SwitchV3 } from './V3/SwitchV3.node';
|
||||
|
||||
export class Switch extends VersionedNodeType {
|
||||
constructor() {
|
||||
@@ -12,12 +13,13 @@ export class Switch extends VersionedNodeType {
|
||||
icon: 'fa:map-signs',
|
||||
group: ['transform'],
|
||||
description: 'Route items depending on defined expression or rules',
|
||||
defaultVersion: 2,
|
||||
defaultVersion: 3,
|
||||
};
|
||||
|
||||
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
||||
1: new SwitchV1(baseDescription),
|
||||
2: new SwitchV2(baseDescription),
|
||||
3: new SwitchV3(baseDescription),
|
||||
};
|
||||
|
||||
super(nodeVersions, baseDescription);
|
||||
|
||||
Reference in New Issue
Block a user