Fix
This commit is contained in:
parent
6688ccf1ab
commit
225d062fcc
|
@ -44,10 +44,11 @@ export function updateFilterKeys(
|
||||||
if (!isPlainObject(filter)) {
|
if (!isPlainObject(filter)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for (let [key, keyFilter] of Object.entries(filter)) {
|
for (const [key, keyFilter] of Object.entries(filter)) {
|
||||||
if (keyFilter === "") {
|
if (keyFilter === "") {
|
||||||
delete filter[key]
|
delete filter[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
const possibleKey = updates.find(({ original }) =>
|
const possibleKey = updates.find(({ original }) =>
|
||||||
key.match(makeFilterKeyRegex(original))
|
key.match(makeFilterKeyRegex(original))
|
||||||
)
|
)
|
||||||
|
@ -55,8 +56,8 @@ export function updateFilterKeys(
|
||||||
// only replace the first, not replaceAll
|
// only replace the first, not replaceAll
|
||||||
filter[
|
filter[
|
||||||
key.replace(
|
key.replace(
|
||||||
new RegExp(`^${possibleKey.original}\\.`),
|
new RegExp(`^(\\d+:)?${possibleKey.original}\\.`),
|
||||||
`${possibleKey.updated}.`
|
`$1${possibleKey.updated}.`
|
||||||
)
|
)
|
||||||
] = filter[key]
|
] = filter[key]
|
||||||
delete filter[key]
|
delete filter[key]
|
||||||
|
|
Loading…
Reference in New Issue