Make special variables like $node, $parameter, ... accessible

in Function Nodes
This commit is contained in:
Jan Oberhauser
2019-09-04 14:53:39 +02:00
parent c1e753e9d1
commit 48ccb36536
5 changed files with 37 additions and 6 deletions

View File

@@ -57,6 +57,10 @@ export class FunctionItem implements INodeType {
},
};
// Make it possible to access data via $node, $parameter, ...
const dataProxy = this.getWorkflowDataProxy();
Object.assign(sandbox, dataProxy);
const vm = new NodeVM({
console: 'inherit',
sandbox,