mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
✨ Make special variables like $node, $parameter, ... accessible
in Function Nodes
This commit is contained in:
@@ -48,8 +48,14 @@ export class Function implements INodeType {
|
||||
getNodeParameter: this.getNodeParameter,
|
||||
helpers: this.helpers,
|
||||
items,
|
||||
// To be able to access data of other items
|
||||
$item: (index: number) => this.getWorkflowDataProxy(index),
|
||||
};
|
||||
|
||||
// Make it possible to access data via $node, $parameter, ...
|
||||
// By default use data from first item
|
||||
Object.assign(sandbox, sandbox.$item(0));
|
||||
|
||||
const vm = new NodeVM({
|
||||
console: 'inherit',
|
||||
sandbox,
|
||||
|
||||
Reference in New Issue
Block a user