From 850cc30e7acbbffc9a1e6dad8c32ae93836cd1fe Mon Sep 17 00:00:00 2001 From: Karl-Aksel Puulmann Date: Thu, 23 May 2024 10:54:08 +0300 Subject: [PATCH] Fix opening a filter modal (#4123) Follow-up to #4117 Opening a utm modal crashed if there was an existing page filter. Bug struck in during a refactoring. --- assets/js/dashboard/stats/modals/filter-modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/dashboard/stats/modals/filter-modal.js b/assets/js/dashboard/stats/modals/filter-modal.js index 0b2be394b..d81c08854 100644 --- a/assets/js/dashboard/stats/modals/filter-modal.js +++ b/assets/js/dashboard/stats/modals/filter-modal.js @@ -16,7 +16,7 @@ function partitionFilters(modalType, filters) { filters.forEach((filter, index) => { const filterGroup = getFilterGroup(filter) - if (FILTER_GROUP_TO_MODAL_TYPE[modalType].includes(filterGroup)) { + if (FILTER_GROUP_TO_MODAL_TYPE[filterGroup] === modalType) { const key = filterState[filterGroup] ? `${filterGroup}:${index}` : filterGroup filterState[key] = filter hasRelevantFilters = true