diff --git a/packages/core/src/Node.ts b/packages/core/src/Node.ts index ee1f1b70..664d9ca5 100644 --- a/packages/core/src/Node.ts +++ b/packages/core/src/Node.ts @@ -102,8 +102,9 @@ class Node extends EventEmitter { const { codeType = HookCodeType.CODE, codeId, params: itemParams = {} } = item; let functionContent: ((...args: any[]) => any) | string | undefined; - const functionParams: { app: TMagicApp; params: Record; dataSource?: DataSource } = { + const functionParams: { app: TMagicApp; node: Node; params: Record; dataSource?: DataSource } = { app: this.app, + node: this, params: params || itemParams, };