From 452a7a0de80c472e1dfd4d4ad90e5238a1fc36d4 Mon Sep 17 00:00:00 2001 From: Shireen Missi Date: Thu, 5 Sep 2024 16:06:50 +0100 Subject: [PATCH 1/2] fix the issue in trigger nodes Co-authored-by: Elias Meire --- packages/cli/src/node-types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/node-types.ts b/packages/cli/src/node-types.ts index 550b836a16c66..baf828ac37706 100644 --- a/packages/cli/src/node-types.ts +++ b/packages/cli/src/node-types.ts @@ -74,8 +74,8 @@ export class NodeTypes implements INodeTypes { if (type in knownNodes) { const { className, sourcePath } = knownNodes[type]; - const loaded: INodeType | IVersionedNodeType = loadClassInIsolation(sourcePath, className); - if (NodeHelpers.isINodeType(loaded)) NodeHelpers.applySpecialNodeParameters(loaded); + const loaded: INodeType = loadClassInIsolation(sourcePath, className); + NodeHelpers.applySpecialNodeParameters(loaded); loadedNodes[type] = { sourcePath, type: loaded }; return loadedNodes[type]; From f1c1c4c99d8601ea4ae6494877905106c72a8959 Mon Sep 17 00:00:00 2001 From: Oleg Ivaniv Date: Thu, 5 Sep 2024 18:17:14 +0200 Subject: [PATCH 2/2] Remove unused isINodeType method --- packages/workflow/src/NodeHelpers.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/workflow/src/NodeHelpers.ts b/packages/workflow/src/NodeHelpers.ts index 1a58de2302a3a..9e68a03a8088a 100644 --- a/packages/workflow/src/NodeHelpers.ts +++ b/packages/workflow/src/NodeHelpers.ts @@ -352,13 +352,6 @@ const declarativeNodeOptionParameters: INodeProperties = { ], }; -/** - * Determines if the node is of INodeType - */ -export function isINodeType(obj: unknown): obj is INodeType { - return typeof obj === 'object' && obj !== null && 'execute' in obj; -} - /** * Modifies the description of the passed in object, such that it can be used * as an AI Agent Tool.