fix(Compare Datasets Node): Fuzzy compare not comparing keys missing in one of inputs

This commit is contained in:
Michael Kret
2023-04-03 18:31:03 +03:00
committed by GitHub
parent 6a1b7c306b
commit d1945d9b72
3 changed files with 253 additions and 17 deletions

View File

@@ -13,7 +13,7 @@ export class CompareDatasets implements INodeType {
name: 'compareDatasets',
icon: 'file:compare.svg',
group: ['transform'],
version: [1, 2],
version: [1, 2, 2.1],
description: 'Compare two inputs for changes',
defaults: { name: 'Compare Datasets' },
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
@@ -102,8 +102,8 @@ export class CompareDatasets implements INodeType {
description:
"Whether to tolerate small type differences when comparing fields. E.g. the number 3 and the string '3' are treated as the same.",
displayOptions: {
show: {
'@version': [2],
hide: {
'@version': [1],
},
},
},
@@ -169,8 +169,8 @@ export class CompareDatasets implements INodeType {
description:
"Whether to tolerate small type differences when comparing fields. E.g. the number 3 and the string '3' are treated as the same.",
displayOptions: {
hide: {
'@version': [2],
show: {
'@version': [1],
},
},
},
@@ -214,7 +214,7 @@ export class CompareDatasets implements INodeType {
options.nodeVersion = this.getNode().typeVersion;
if (options.nodeVersion === 2) {
if (options.nodeVersion >= 2) {
options.fuzzyCompare = this.getNodeParameter('fuzzyCompare', 0, false) as boolean;
}