Skip to content

Commit

Permalink
Elastic: Fix data-fab-task handling (#7038)
Browse files Browse the repository at this point in the history
Since the code is executed before rcmail init event, we have to use rcmail.env.task
instead of rcmail.task.
  • Loading branch information
alecpl committed Nov 15, 2019
1 parent 594a12b commit ebfd0f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skins/elastic/ui.js
Expand Up @@ -501,7 +501,7 @@ function rcube_elastic_ui()
task = button.data('fab-task') || '*',
action = button.data('fab-action') || '*';

if ((task == '*' || task == rcmail.task)
if ((task == '*' || task == rcmail.env.task)
&& (action == '*' || action == rcmail.env.action || (action == 'none' && !rcmail.env.action))
) {
fabuttons.push(create_cloned_button(button, false, false, true));
Expand Down

0 comments on commit ebfd0f5

Please sign in to comment.