mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 06:02:25 -05:00
Update ExampleNode.node.ts
This commit is contained in:
parent
7eb8838df5
commit
b2ba2d1cf1
1 changed files with 6 additions and 6 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import {
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
export class ExampleNode implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
|
@ -16,8 +16,8 @@ export class ExampleNode implements INodeType {
|
|||
defaults: {
|
||||
name: 'Example Node',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
properties: [
|
||||
// Node properties which the user gets displayed and
|
||||
// can change on the node.
|
||||
|
|
@ -50,7 +50,7 @@ export class ExampleNode implements INodeType {
|
|||
myString = this.getNodeParameter('myString', itemIndex, '') as string;
|
||||
item = items[itemIndex];
|
||||
|
||||
item.json['myString'] = myString;
|
||||
item.json.myString = myString;
|
||||
} catch (error) {
|
||||
// This node should never fail but we want to showcase how
|
||||
// to handle errors.
|
||||
|
|
@ -71,6 +71,6 @@ export class ExampleNode implements INodeType {
|
|||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue