mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Summarize Node): Fix spaces in Fields to Split By values converted to underscores (#15020)
This commit is contained in:
@@ -225,22 +225,22 @@ export function aggregateAndSplitData({
|
||||
|
||||
const groupedItems = new Map<unknown, IDataObject[]>();
|
||||
for (const item of inputItems) {
|
||||
let key = getValue(item, firstSplitKey);
|
||||
let splitValue = getValue(item, firstSplitKey);
|
||||
|
||||
if (key && typeof key === 'object') {
|
||||
key = JSON.stringify(key);
|
||||
if (splitValue && typeof splitValue === 'object') {
|
||||
splitValue = JSON.stringify(splitValue);
|
||||
}
|
||||
|
||||
if (convertKeysToString) {
|
||||
key = normalizeFieldName(String(key));
|
||||
splitValue = String(splitValue);
|
||||
}
|
||||
|
||||
if (options.skipEmptySplitFields && typeof key !== 'number' && !key) {
|
||||
if (options.skipEmptySplitFields && typeof splitValue !== 'number' && !splitValue) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const group = groupedItems.get(key) ?? [];
|
||||
groupedItems.set(key, group.concat([item]));
|
||||
const group = groupedItems.get(splitValue) ?? [];
|
||||
groupedItems.set(splitValue, group.concat([item]));
|
||||
}
|
||||
|
||||
const splits = new Map(
|
||||
|
||||
Reference in New Issue
Block a user