🐛 Fix issue with Expression-Mode on Switch-Node #1843

This commit is contained in:
Jan Oberhauser 2021-05-30 12:15:41 -05:00
parent 4d86384d9d
commit 1ec916e530

View file

@ -618,8 +618,6 @@ export class Switch implements INodeType {
}
};
const dataType = this.getNodeParameter('dataType', 0) as string;
// Itterate over all items to check to which output they should be routed to
itemLoop:
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
@ -636,6 +634,8 @@ export class Switch implements INodeType {
} else if (mode === 'rules') {
// Rules decide how to route item
const dataType = this.getNodeParameter('dataType', 0) as string;
value1 = this.getNodeParameter('value1', itemIndex) as NodeParameterValue;
if (dataType === 'dateTime') {
value1 = convertDateTime(value1);