Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NORDCOMPCZ committed Jan 8, 2020
1 parent 12f25cc commit f6264d2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/module-elasticsuite-catalog/Block/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,12 @@ public function getActiveFilters()
$requestParams = array_keys($this->getRequest()->getParams());
$displayedFilters = $this->getDisplayedFilters();
$expandedFacets = $this->_scopeConfig->getValue(self::DEFAULT_EXPANDED_FACETS_COUNT_CONFIG_XML_PATH);
$activeFilters = range(0, min(count($displayedFilters), $expandedFacets) - 1);

$activeFilters = [];

if ($expandedFacets > 0) {
$activeFilters = range(0, min(count($displayedFilters), $expandedFacets) - 1);
}

foreach ($displayedFilters as $index => $filter) {
if (in_array($filter->getRequestVar(), $requestParams)) {
$activeFilters[] = $index;
Expand Down

0 comments on commit f6264d2

Please sign in to comment.