From 2175106e510c1c6ca3ae55a72bbba3d28b81641d Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Thu, 24 Sep 2020 16:15:57 -0400 Subject: [PATCH] fix account actions view --- src/_pages/main/account/MyAccount.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/_pages/main/account/MyAccount.vue b/src/_pages/main/account/MyAccount.vue index ff947de..8edcf0e 100644 --- a/src/_pages/main/account/MyAccount.vue +++ b/src/_pages/main/account/MyAccount.vue @@ -69,13 +69,15 @@ export default { computed: { ...mapState('system', ['messages', 'configs']), manage_account_actions: function () { - const account_actions = this.configs.bubbleNode === true ? 'manage_account_node_actions' : 'manage_account_sage_actions'; - const actions = this.messages[account_actions].split(','); - if (this.currentUser.admin && this.currentUser.firstAdmin) { - const delete_index = actions.indexOf('delete'); - return delete_index === -1 ? actions : actions.splice(delete_index,1); + if (this.messages) { + const account_actions = this.configs.bubbleNode === true ? 'manage_account_node_actions' : 'manage_account_sage_actions'; + const actions = this.messages[account_actions].split(','); + if (this.currentUser.admin && this.currentUser.firstAdmin) { + const delete_index = actions.indexOf('delete'); + if (delete_index !== -1) actions.splice(delete_index, 1); + } + return actions; } - return actions; } }, methods: {