Skip to content

Commit

Permalink
[7.17] encoding fixes (#198857)
Browse files Browse the repository at this point in the history
## Summary

Fixes encoding errors where only the first `replace` match was getting
replaced.
  • Loading branch information
bryce-b authored Nov 5, 2024
1 parent fc4b6e3 commit 7e68e2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 7e68e2c

Please sign in to comment.