🐛 Fix bug in Zendesk Trigger node with wrong conditions (#1668)

This commit is contained in:
Bart Vollebregt
2021-04-17 17:08:07 +02:00
committed by GitHub
parent e46242faf5
commit c80b0ebfd9

View File

@@ -442,11 +442,11 @@ export class ZendeskTrigger implements INodeType {
const conditionsAll = conditions.all as [IDataObject];
let endpoint = '';
const aux: IDataObject = {};
const resultAll = [], resultAny = [];
if (conditionsAll) {
for (const conditionAll of conditionsAll) {
const aux: IDataObject = {};
aux.field = conditionAll.field;
aux.operator = conditionAll.operation;
if (conditionAll.operation !== 'changed'
@@ -462,6 +462,7 @@ export class ZendeskTrigger implements INodeType {
const conditionsAny = conditions.any as [IDataObject];
if (conditionsAny) {
for (const conditionAny of conditionsAny) {
const aux: IDataObject = {};
aux.field = conditionAny.field;
aux.operator = conditionAny.operation;
if (conditionAny.operation !== 'changed'
@@ -510,7 +511,6 @@ export class ZendeskTrigger implements INodeType {
const webhookData = this.getWorkflowStaticData('node');
const service = this.getNodeParameter('service') as string;
if (service === 'support') {
const aux: IDataObject = {};
const message: IDataObject = {};
const resultAll = [], resultAny = [];
const conditions = this.getNodeParameter('conditions') as IDataObject;
@@ -530,6 +530,7 @@ export class ZendeskTrigger implements INodeType {
const conditionsAll = conditions.all as [IDataObject];
if (conditionsAll) {
for (const conditionAll of conditionsAll) {
const aux: IDataObject = {};
aux.field = conditionAll.field;
aux.operator = conditionAll.operation;
if (conditionAll.operation !== 'changed'
@@ -544,6 +545,7 @@ export class ZendeskTrigger implements INodeType {
const conditionsAny = conditions.any as [IDataObject];
if (conditionsAny) {
for (const conditionAny of conditionsAny) {
const aux: IDataObject = {};
aux.field = conditionAny.field;
aux.operator = conditionAny.operation;
if (conditionAny.operation !== 'changed'