fix: Blank page after deleting contact (#3948)

This commit is contained in:
Sivin Varghese 2022-02-09 14:35:18 +05:30 committed by GitHub
parent 4e416b4d51
commit 0ec3a56041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,6 +266,9 @@ export default {
await this.$store.dispatch('contacts/delete', id);
this.$emit('panel-close');
this.showAlert(this.$t('DELETE_CONTACT.API.SUCCESS_MESSAGE'));
if (this.$route.name !== 'contacts_dashboard') {
this.$router.push({ name: 'contacts_dashboard' });
}
} catch (error) {
this.showAlert(
error.message