diff --git a/main/inc/lib/formvalidator/Element/SelectAjax.php b/main/inc/lib/formvalidator/Element/SelectAjax.php index f769c66833..d327229528 100644 --- a/main/inc/lib/formvalidator/Element/SelectAjax.php +++ b/main/inc/lib/formvalidator/Element/SelectAjax.php @@ -95,9 +95,14 @@ class SelectAjax extends HTML_QuickForm_select }; }, processResults: function (data, page) { - //parse the results into the format expected by Select2 + // Parse the results into the format expected by Select2 + if (data.items) { + return { + results: data.items + }; + } return { - results: data.items + results: '' }; } $formatCondition