mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fix NodeViewNew navigation handling (#1853)
* 🐛 Fix NodeViewNew navigation handling * Use event emitter pattern to fix duplicate navigation * Apply review suggestions * Remove unnecessary arrow function * ⚡ Also fix for keyboard shortcut Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -431,7 +431,11 @@ export default mixins(
|
||||
const importConfirm = await this.confirmMessage(`When you switch workflows your current workflow changes will be lost.`, 'Save your Changes?', 'warning', 'Yes, switch workflows and forget changes');
|
||||
if (importConfirm === true) {
|
||||
this.$store.commit('setStateDirty', false);
|
||||
this.$router.push({ name: 'NodeViewNew' });
|
||||
if (this.$router.currentRoute.name === 'NodeViewNew') {
|
||||
this.$root.$emit('newWorkflow');
|
||||
} else {
|
||||
this.$router.push({ name: 'NodeViewNew' });
|
||||
}
|
||||
|
||||
this.$showMessage({
|
||||
title: 'Workflow created',
|
||||
@@ -440,7 +444,9 @@ export default mixins(
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$router.push({ name: 'NodeViewNew' });
|
||||
if (this.$router.currentRoute.name !== 'NodeViewNew') {
|
||||
this.$router.push({ name: 'NodeViewNew' });
|
||||
}
|
||||
|
||||
this.$showMessage({
|
||||
title: 'Workflow created',
|
||||
|
||||
Reference in New Issue
Block a user