1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Force typeahead datasource response into expected array format

Ref T4100. Without this, we sometimes get a sparse array from composite sources and the client isn't sure what to do with it.
This commit is contained in:
epriestley 2015-04-17 11:55:22 -07:00
parent e558a2e729
commit 52c6a9707f

View file

@ -238,6 +238,7 @@ final class PhabricatorTypeaheadModularDatasourceController
} }
$content = mpull($results, 'getWireFormat'); $content = mpull($results, 'getWireFormat');
$content = array_values($content);
if ($request->isAjax()) { if ($request->isAjax()) {
return id(new AphrontAjaxResponse())->setContent($content); return id(new AphrontAjaxResponse())->setContent($content);