Skip to content

Commit

Permalink
Fix grouping in header
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Nov 15, 2024
1 parent db23b4e commit a4863a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
4.4.1 (unreleased)
------------------

- Nothing changed yet.
- Fix grouping in header.
[cekk]


4.4.0 (2023-09-07)
Expand Down
5 changes: 4 additions & 1 deletion src/rer/sitesearch/browser/static/js/SearchResults/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const Header = () => (
const allTotal = facets.groups.values
? facets.groups.values[getTranslationFor('all_types_label')].count
: 0;
const group = filters.group;
let group = filters.group;
if (typeof group === 'object' && group !== null) {
group = group.query;
}
const groupCount = group ? facets.groups.values[group].count : total;
return (
<div className="results-header">
Expand Down

0 comments on commit a4863a7

Please sign in to comment.