mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
adds hint for single item output too
This commit is contained in:
parent
090cd0d305
commit
a66a55aa10
|
@ -18,9 +18,7 @@ import {
|
||||||
fieldValueGetter,
|
fieldValueGetter,
|
||||||
splitData,
|
splitData,
|
||||||
} from './utils';
|
} from './utils';
|
||||||
import { fields } from '../../Contentful/AssetDescription';
|
|
||||||
// import { generatePairedItemData } from '../../../utils/utilities';
|
|
||||||
// [ria] not needed
|
|
||||||
export class Summarize implements INodeType {
|
export class Summarize implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
displayName: 'Summarize',
|
displayName: 'Summarize',
|
||||||
|
@ -352,7 +350,7 @@ export class Summarize implements INodeType {
|
||||||
item: index,
|
item: index,
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
return [[executionData]];
|
return new NodeExecutionOutput([[executionData]], fieldsNotFound);
|
||||||
} else {
|
} else {
|
||||||
if (!fieldsToSplitBy.length) {
|
if (!fieldsToSplitBy.length) {
|
||||||
const { pairedItems, ...json } = aggregationResult;
|
const { pairedItems, ...json } = aggregationResult;
|
||||||
|
@ -362,7 +360,7 @@ export class Summarize implements INodeType {
|
||||||
item: index,
|
item: index,
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
return [[executionData]];
|
return new NodeExecutionOutput([[executionData]], fieldsNotFound);
|
||||||
}
|
}
|
||||||
const returnData = aggregationToArray(aggregationResult, fieldsToSplitBy);
|
const returnData = aggregationToArray(aggregationResult, fieldsToSplitBy);
|
||||||
const executionData = returnData.map((item) => {
|
const executionData = returnData.map((item) => {
|
||||||
|
|
Loading…
Reference in a new issue