fix(core): Guard against node not found on cancelling test webhook (#7750)

https://n8nio.sentry.io/issues/4623682198
This commit is contained in:
Iván Ovejero 2023-11-17 17:10:26 +01:00 committed by GitHub
parent 82f3202a2d
commit 6be453b716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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];