Commit dbcb5da 1 parent 124ac26 commit dbcb5da Copy full SHA for dbcb5da
File tree 2 files changed +5
-4
lines changed
packages/nodes-base/nodes/Transform/Summarize
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ export class Summarize implements INodeType {
345
345
return [ [ executionData ] ] ;
346
346
} else {
347
347
if ( ! fieldsToSplitBy . length ) {
348
+ // [ria] if no fields to split by
348
349
const { pairedItems, ...json } = aggregationResult ;
349
350
const executionData : INodeExecutionData = {
350
351
json,
@@ -354,7 +355,7 @@ export class Summarize implements INodeType {
354
355
} ;
355
356
return [ [ executionData ] ] ;
356
357
}
357
- const returnData = aggregationToArray ( aggregationResult , fieldsToSplitBy ) ;
358
+ const returnData = aggregationToArray ( aggregationResult , fieldsToSplitBy ) ; // [ria] change here !!
358
359
const executionData = returnData . map ( ( item ) => {
359
360
const { pairedItems, ...json } = item ;
360
361
return {
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ export function splitData(
231
231
const [ firstSplitKey , ...restSplitKeys ] = splitKeys ;
232
232
233
233
const groupedData = data . reduce ( ( acc , item ) => {
234
- let keyValuee = getValue ( item , firstSplitKey ) as string ;
234
+ let keyValuee = getValue ( item , firstSplitKey ) as string ; // [ria] is still a number
235
235
236
236
if ( typeof keyValuee === 'object' ) {
237
237
keyValuee = JSON . stringify ( keyValuee ) ;
@@ -240,9 +240,9 @@ export function splitData(
240
240
if ( options . skipEmptySplitFields && typeof keyValuee !== 'number' && ! keyValuee ) {
241
241
return acc ;
242
242
}
243
-
243
+ // [ria] keyValuee is still number at this point
244
244
if ( acc [ keyValuee ] === undefined ) {
245
- acc [ keyValuee ] = [ item ] ;
245
+ acc [ keyValuee ] = [ item ] ; // [ria] becomes string here
246
246
} else {
247
247
( acc [ keyValuee ] as IDataObject [ ] ) . push ( item ) ;
248
248
}
You can’t perform that action at this time.
0 commit comments