-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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(editor): Prevent error from showing-up when duplicating unsaved workflow #5833
fix(editor): Prevent error from showing-up when duplicating unsaved workflow #5833
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Files matching
Files matching
Make sure to check off this list before asking for review. |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #5833 +/- ##
=======================================
Coverage 14.84% 14.84%
=======================================
Files 2475 2475
Lines 113363 113371 +8
Branches 17702 17704 +2
=======================================
+ Hits 16826 16829 +3
- Misses 95993 95997 +4
- Partials 544 545 +1 see 7 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
…orkflow (n8n-io#5833) * fix(editor): Prevent error from showing-up when duplicating unsaved workflow * Add unsaved workflow duplicate test
Got released with |
…orkflow (n8n-io#5833) * fix(editor): Prevent error from showing-up when duplicating unsaved workflow * Add unsaved workflow duplicate test
In the
DuplicateWorkflowDialog
modal we were usinggetWorkflowById
to get the current workflow data. But if the workflow is not saved, it's not stored inworkflowsById
so it can't be retrieved and would throw an error. Instead, we use the current workflow data(workflowsStore.workflow
) if the id isPLACEHOLDER_EMPTY_WORKFLOW_ID
and current workflows id is alsoPLACEHOLDER_EMPTY_WORKFLOW_ID
.Github issue / Community forum post (link here to close automatically):