Skip to content
Snippets Groups Projects
Commit 2f07e8b9 authored by Martynas Sudintas's avatar Martynas Sudintas
Browse files

AggregationsEndpoint is now using count() instead of empty()

parent e4ecd8a5
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ class AggregationsEndpoint implements SearchEndpointInterface
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
{
if (!empty($this->bag->all())) {
if (count($this->bag->all()) > 0) {
return $this->bag->toArray();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment