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.
This commit is contained in:
Karl-Aksel Puulmann 2024-05-23 10:54:08 +03:00 committed by GitHub
parent ab1416ba10
commit 850cc30e7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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