From a4863a73d2c8060222a4003555549b4768a92826 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Fri, 15 Nov 2024 10:11:34 +0100 Subject: [PATCH] Fix grouping in header --- CHANGELOG.rst | 3 ++- src/rer/sitesearch/browser/static/js/SearchResults/header.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f7280f4..7967089 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,8 @@ Changelog 4.4.1 (unreleased) ------------------ -- Nothing changed yet. +- Fix grouping in header. + [cekk] 4.4.0 (2023-09-07) diff --git a/src/rer/sitesearch/browser/static/js/SearchResults/header.js b/src/rer/sitesearch/browser/static/js/SearchResults/header.js index c2da3b3..d32d88b 100644 --- a/src/rer/sitesearch/browser/static/js/SearchResults/header.js +++ b/src/rer/sitesearch/browser/static/js/SearchResults/header.js @@ -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 (