diff --git a/client/src/helpers/action-item-setup.js b/client/src/helpers/action-item-setup.js index ccdb68249e..bc37a14298 100644 --- a/client/src/helpers/action-item-setup.js +++ b/client/src/helpers/action-item-setup.js @@ -85,6 +85,14 @@ define(() => { item.html = this.language.translate(name, 'actions', scope); } + item.data = item.data || {}; + + let handlerName = item.handler || item.data.handler; + + if (handlerName && !item.data.handler) { + item.data.handler = handlerName; + } + addFunc(item); if (!Espo.Utils.checkActionAvailability(this.viewHelper, item)) { @@ -97,9 +105,6 @@ define(() => { actionList.push(item); - let data = item.data || {}; - let handlerName = item.handler || data.handler; - if (!handlerName) { return; }