[7.17] encoding fixes (#198857)

## Summary

Fixes encoding errors where only the first `replace` match was getting
replaced.
This commit is contained in:
Bryce Buchanan 2024-11-05 07:18:09 -08:00 committed by GitHub
parent fc4b6e3bbf
commit 7e68e2c7f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@
export function createPicker(fields: string[]) {
const wildcards = fields
.filter((field) => field.endsWith('.*'))
.map((field) => field.replace('*', ''));
.map((field) => field.replace(/\*/g, ''));
return (value: unknown, key: string) => {
return fields.includes(key) || wildcards.some((field) => key.startsWith(field));

View file

@ -114,7 +114,7 @@ export const createFilterFromOptions = (
filters.push(options.filterQuery);
}
if (options.groupBy) {
const id = series.id.replace('"', '\\"');
const id = series.id.replace(/"/g, '\\"');
const groupByFilters = Array.isArray(options.groupBy)
? options.groupBy
.map((field, index) => {