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:
Pavel Vomacka authored and Tomas Krizek committed 2017-09-01 11:43:52 +02:00
1 parent d5ef1a7fd0
commit 76f217b289
1 file changed
+1 -1
+1 -1
View File
@@ -63,7 +63,7 @@ exp.search_facet_control_buttons_pre_op = function(spec, context) {
var default_actions = ['refresh', 'batch_remove', 'add'];
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 || [];
if (!spec.no_update) {