fix(editor): Make sure to redirect to blank canvas after personalisation modal (#5980)

* fix(editor): Make sure to redirect to blank canvas after personalization modal

* Linting fix
This commit is contained in:
OlegIvaniv 2023-04-14 13:33:58 +02:00 committed by GitHub
parent b13b7d73e7
commit 7c474d3c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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';
@ -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');