mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Item Lists Node): Don't check same type in remove duplicates operation (#7678)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
IBinaryData,
|
||||
INode,
|
||||
INodeExecutionData,
|
||||
GenericValue,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
@@ -147,3 +148,22 @@ export function addBinariesToItem(
|
||||
|
||||
return newItem;
|
||||
}
|
||||
|
||||
export function typeToNumber(value: GenericValue): number {
|
||||
if (typeof value === 'object') {
|
||||
if (Array.isArray(value)) return 9;
|
||||
if (value === null) return 10;
|
||||
if (value instanceof Date) return 11;
|
||||
}
|
||||
const types = {
|
||||
_string: 1,
|
||||
_number: 2,
|
||||
_bigint: 3,
|
||||
_boolean: 4,
|
||||
_symbol: 5,
|
||||
_undefined: 6,
|
||||
_object: 7,
|
||||
_function: 8,
|
||||
};
|
||||
return types[`_${typeof value}`];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user