-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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(core)!: $(...).[last,first,all]()
defaulting to the first output instead of the output that connects the nodes
#9760
Conversation
… instead of the output that connects the nodes
$(...).[last,first,all]()
defaulting to the first output instead of the output that connects the nodes$(...).[last,first,all]()
defaulting to the first output instead of the output that connects the nodes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing this bug and adding the tests! Great work!
4 flaky tests on run #5580 ↗︎
Details:
5-ndv.cy.ts • 2 flaky tests
10-undo-redo.cy.ts • 1 flaky test
30-editor-after-route-changes.cy.ts • 1 flaky test
Review all test suite changes for PR #9760 ↗︎ |
✅ All Cypress E2E specs passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this! If this is a breaking change, let's please update the breaking changes doc as well. Else let's remove !
from the title.
Follow-up: https://linear.app/n8n/issue/PAY-1692 |
4f9a2df
to
4f83349
Compare
✅ All Cypress E2E specs passed |
…t instead of the output that connects the nodes (n8n-io#9760)
…t instead of the output that connects the nodes (n8n-io#9760)
Got released with |
1 similar comment
Got released with |
Summary
This PR makes
$(...).[last|first|all]()
default to the the output the node was connected to.Before it would default to the first output.
Example Workflow
Before it would always evaluate output 0 (true branch)
Now it will take the output that connects the nodes. If the user wants another output they'd have to specify if like
$(...).last(1)
Workflows that rely on something like the third example will break with this change.
Workflows that rely on
last
,first
andall
always returning the first output will also break.The ticket is marked as a bug, meaning this was never the intended behavior. I marked this as a breaking change regardless.
We'd also want to update the docs to make it clear how those functions work: https://docs.n8n.io/code/builtin/output-other-nodes/
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/PAY-1400/bug-dollarlast-uses-wrong-branch
n8n-io/n8n-docs#2167
Review / Merge checklist
PR Labeled withrelease/backport
(if the PR is an urgent fix that needs to be backported)