mirror of
https://github.com/plausible/analytics.git
synced 2024-11-30 00:58:54 +03:00
Fix legacy compatibility redirect (#4424)
This commit is contained in:
parent
1f8662438d
commit
f9ea5444b0
@ -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))}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user