mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
⚡ Change the place where output format is made (#2506)
The router file now correctly returns a `INodeExecutionData[][]` instead of a simple `INodeExecutionData[]` forcing the main node file to correct this.
This commit is contained in:
parent
a41afc8013
commit
2e57d86fd6
|
@ -26,9 +26,6 @@ export class MattermostV1 implements INodeType {
|
|||
methods = { loadOptions };
|
||||
|
||||
async execute(this: IExecuteFunctions) {
|
||||
// Router returns INodeExecutionData[]
|
||||
// We need to output INodeExecutionData[][]
|
||||
// So we wrap in []
|
||||
return [await router.call(this)];
|
||||
return await router.call(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import * as reaction from './reaction';
|
|||
import * as user from './user';
|
||||
import { Mattermost } from './Interfaces';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[]> {
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
const operationResult: INodeExecutionData[] = [];
|
||||
|
||||
|
@ -49,5 +49,5 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
|||
}
|
||||
}
|
||||
|
||||
return operationResult;
|
||||
return [operationResult];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue