feat: Filter parameter: Improve loose type validation for booleans (#10702)
This commit is contained in:
@@ -14,7 +14,7 @@ export class Switch extends VersionedNodeType {
|
||||
iconColor: 'light-blue',
|
||||
group: ['transform'],
|
||||
description: 'Route items depending on defined expression or rules',
|
||||
defaultVersion: 3.1,
|
||||
defaultVersion: 3.2,
|
||||
};
|
||||
|
||||
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
||||
@@ -22,6 +22,7 @@ export class Switch extends VersionedNodeType {
|
||||
2: new SwitchV2(baseDescription),
|
||||
3: new SwitchV3(baseDescription),
|
||||
3.1: new SwitchV3(baseDescription),
|
||||
3.2: new SwitchV3(baseDescription),
|
||||
};
|
||||
|
||||
super(nodeVersions, baseDescription);
|
||||
|
||||
@@ -50,7 +50,7 @@ export class SwitchV3 implements INodeType {
|
||||
this.description = {
|
||||
...baseDescription,
|
||||
subtitle: `=mode: {{(${capitalize})($parameter["mode"])}}`,
|
||||
version: [3, 3.1],
|
||||
version: [3, 3.1, 3.2],
|
||||
defaults: {
|
||||
name: 'Switch',
|
||||
color: '#506000',
|
||||
@@ -160,6 +160,7 @@ export class SwitchV3 implements INodeType {
|
||||
filter: {
|
||||
caseSensitive: '={{!$parameter.options.ignoreCase}}',
|
||||
typeValidation: getTypeValidationStrictness(3.1),
|
||||
version: '={{ $nodeVersion >= 3.2 ? 2 : 1 }}',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user