fix(Respond to Webhook Node): Fix issue stopping form trigger response (#9157)

This commit is contained in:
Jon
2024-04-19 10:54:55 +01:00
committed by GitHub
parent 91e59120c4
commit 6c63cd9711

View File

@@ -290,10 +290,12 @@ export class RespondToWebhook implements INodeType {
const items = this.getInputData(); const items = this.getInputData();
const nodeVersion = this.getNode().typeVersion; const nodeVersion = this.getNode().typeVersion;
const WEBHOOK_NODE_TYPES = ['n8n-nodes-base.webhook', 'n8n-nodes-base.formTrigger'];
try { try {
if (nodeVersion >= 1.1) { if (nodeVersion >= 1.1) {
const connectedNodes = this.getParentNodes(this.getNode().name); const connectedNodes = this.getParentNodes(this.getNode().name);
if (!connectedNodes.some((node) => node.type === 'n8n-nodes-base.webhook')) { if (!connectedNodes.some(({ type }) => WEBHOOK_NODE_TYPES.includes(type))) {
throw new NodeOperationError( throw new NodeOperationError(
this.getNode(), this.getNode(),
new Error('No Webhook node found in the workflow'), new Error('No Webhook node found in the workflow'),