Fix legacy compatibility redirect (#4424)

This commit is contained in:
Artur Pata 2024-08-06 19:39:29 +03:00 committed by GitHub
parent 1f8662438d
commit f9ea5444b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,6 @@ export function filtersBackwardsCompatibilityRedirect(windowLocation, windowHist
if (LEGACY_URL_PARAMETERS.hasOwnProperty(key)) { if (LEGACY_URL_PARAMETERS.hasOwnProperty(key)) {
const filter = parseLegacyFilter(key, value) const filter = parseLegacyFilter(key, value)
filters.push(filter) filters.push(filter)
const labelsKey = LEGACY_URL_PARAMETERS[key] const labelsKey = LEGACY_URL_PARAMETERS[key]
if (labelsKey && getValue(labelsKey)) { if (labelsKey && getValue(labelsKey)) {
const clauses = filter[2] const clauses = filter[2]
@ -126,7 +125,7 @@ export function filtersBackwardsCompatibilityRedirect(windowLocation, windowHist
} }
if (filters.length > 0) { if (filters.length > 0) {
changedSearchRecordEntries.push([['filters', filters], ['labels', labels]]) changedSearchRecordEntries.push(['filters', filters], ['labels', labels])
windowHistory.pushState({}, null, `${windowLocation.pathname}${stringifySearch(Object.fromEntries(changedSearchRecordEntries))}`) windowHistory.pushState({}, null, `${windowLocation.pathname}${stringifySearch(Object.fromEntries(changedSearchRecordEntries))}`)
} }
} }