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 2017-06-26 17:41:16 +02:00 committed by Tomas Krizek
parent d5ef1a7fd0
commit 76f217b289
No known key found for this signature in database
GPG Key ID: 22A2A94B5E49415A

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) {