Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

bartvollebregt
Copy link
Contributor

@bartvollebregt bartvollebregt commented Apr 16, 2021

This is my first PR for n8n so if I'm doing something wrong, please let me know. Never too late to learn!

The conditions for the Zendesk trigger node are populated in the resultAll and resultAny variables.
While populating these variables, the const aux: IDataObject = {}; variable from the outer scope is used to create entries for the resultAll and resultAny variables.

However, the aux variable from the outer scope is pushed to the resultAll and resultAny variables by reference. Therefore, at the second index in the loop, this for example aux.field = conditionAll.field; will also update the value of the previously pushed item.

The result is resultAll and resultAny variable where the entry's are all the same.

Fixed by moving the aux variable inside the loop scope.

@CLAassistant
Copy link

CLAassistant commented Apr 16, 2021

CLA assistant check
All committers have signed the CLA.

@janober janober merged commit c80b0eb into n8n-io:master Apr 17, 2021
@janober
Copy link
Member

janober commented Apr 17, 2021

Thanks a lot for fixing this @bartvollebregt! Got merged.

@janober
Copy link
Member

janober commented Apr 17, 2021

Got released with n8n@0.116.0

@bartvollebregt bartvollebregt deleted the bugfix/zendesk-trigger-wrong-conditions branch April 18, 2021 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants