From 6b04363c9c0f5b3df22585258e67e2a5436e5f98 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Thu, 24 Sep 2020 16:23:56 -0400 Subject: [PATCH] avoid error when loading --- src/_pages/main/account/MyAccount.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/_pages/main/account/MyAccount.vue b/src/_pages/main/account/MyAccount.vue index 8edcf0e..e8da2c6 100644 --- a/src/_pages/main/account/MyAccount.vue +++ b/src/_pages/main/account/MyAccount.vue @@ -71,12 +71,14 @@ export default { manage_account_actions: function () { 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); + if (this.messages[account_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; } } },