Skip to content

Commit

Permalink
fix(editor): Make sure to redirect to blank canvas after personalizat…
Browse files Browse the repository at this point in the history
…ion modal
  • Loading branch information
OlegIvaniv committed Apr 14, 2023
1 parent 49d838f commit f501cc7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/editor-ui/src/components/PersonalizationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ import {
REPORTED_SOURCE_EVENT,
REPORTED_SOURCE_OTHER,
REPORTED_SOURCE_OTHER_KEY,
} from '../constants';
VIEWS,
} from '@/constants';
import { workflowHelpers } from '@/mixins/workflowHelpers';
import { showMessage } from '@/mixins/showMessage';
import Modal from './Modal.vue';
Expand Down Expand Up @@ -606,6 +607,11 @@ export default mixins(showMessage, workflowHelpers).extend({
methods: {
closeDialog() {
this.modalBus.emit('close');
// In case the redirect to canvas for new users didn't happen
// we try again after closing the modal
if(this.$route.name !== VIEWS.NEW_WORKFLOW) {
this.$router.replace({ name: VIEWS.NEW_WORKFLOW });
}
},
onSave() {
this.formBus.emit('submit');
Expand Down

0 comments on commit f501cc7

Please sign in to comment.