From 76f217b2893b0604ed0adf372422c685c2febbe8 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Mon, 26 Jun 2017 17:41:16 +0200 Subject: [PATCH] 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 --- install/ui/src/freeipa/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js index fd7174d99..42303cbf5 100644 --- a/install/ui/src/freeipa/search.js +++ b/install/ui/src/freeipa/search.js @@ -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) {