mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Summarize Node): Turns error when field not found in items into warning (#11889)
Co-authored-by: Dana Lee <dana@n8n.io> Co-authored-by: Elias Meire <elias@meire.dev>
This commit is contained in:
@@ -231,20 +231,20 @@ export function splitData(
|
||||
const [firstSplitKey, ...restSplitKeys] = splitKeys;
|
||||
|
||||
const groupedData = data.reduce((acc, item) => {
|
||||
let keyValuee = getValue(item, firstSplitKey) as string;
|
||||
let keyValue = getValue(item, firstSplitKey) as string;
|
||||
|
||||
if (typeof keyValuee === 'object') {
|
||||
keyValuee = JSON.stringify(keyValuee);
|
||||
if (typeof keyValue === 'object') {
|
||||
keyValue = JSON.stringify(keyValue);
|
||||
}
|
||||
|
||||
if (options.skipEmptySplitFields && typeof keyValuee !== 'number' && !keyValuee) {
|
||||
if (options.skipEmptySplitFields && typeof keyValue !== 'number' && !keyValue) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
if (acc[keyValuee] === undefined) {
|
||||
acc[keyValuee] = [item];
|
||||
if (acc[keyValue] === undefined) {
|
||||
acc[keyValue] = [item];
|
||||
} else {
|
||||
(acc[keyValuee] as IDataObject[]).push(item);
|
||||
(acc[keyValue] as IDataObject[]).push(item);
|
||||
}
|
||||
return acc;
|
||||
}, {} as IDataObject);
|
||||
|
||||
Reference in New Issue
Block a user