Skip to content

Commit

Permalink
fix(core): Guard against node not found on cancelling test webhook (n…
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored Nov 17, 2023
1 parent 82f3202 commit 6be453b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/workflow/src/Workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,10 @@ export class Workflow {
activation: WorkflowActivateMode,
isTest?: boolean,
): Promise<boolean | undefined> {
const node = this.getNode(webhookData.node) as INode;
const node = this.getNode(webhookData.node);

if (!node) return;

const nodeType = this.nodeTypes.getByNameAndVersion(node.type, node.typeVersion);

const webhookFn = nodeType.webhookMethods?.[webhookData.webhookDescription.name]?.[method];
Expand Down

0 comments on commit 6be453b

Please sign in to comment.