mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixes bug in actions creating for search facet
In case that there are no actions specified in spec object, the concatenation of arrays causes that 'undefined' item is added into the array. https://pagure.io/freeipa/issue/7052 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
d5ef1a7fd0
commit
76f217b289
@ -63,7 +63,7 @@ exp.search_facet_control_buttons_pre_op = function(spec, context) {
|
|||||||
var default_actions = ['refresh', 'batch_remove', 'add'];
|
var default_actions = ['refresh', 'batch_remove', 'add'];
|
||||||
var merged_actions = override_actions(spec.custom_actions, default_actions);
|
var merged_actions = override_actions(spec.custom_actions, default_actions);
|
||||||
|
|
||||||
spec.actions = merged_actions.concat(spec.actions);
|
spec.actions = merged_actions.concat(spec.actions || []);
|
||||||
spec.control_buttons = spec.control_buttons || [];
|
spec.control_buttons = spec.control_buttons || [];
|
||||||
|
|
||||||
if (!spec.no_update) {
|
if (!spec.no_update) {
|
||||||
|
Loading…
Reference in New Issue
Block a user