Commit e18d66c
committed
fix: resolve potential excludeKeys match to a key path other than at the start of a string
In a case where `excludeKeys` is set to `["arr"]`, there was a possibility that with JSON data looking like this:
```
[
{
"id": 1,
"arr": [
{
"name": "foo"
}
],
"name": {
"arr": "this should appear"
}
},
{
"id": 2,
"arr": [
{
"name": "bar"
}
],
"name": {
"arr": "this should also appear"
}
}
]
```
could potentially result in both `arr.name` and `name.arr` being excluded. By adjusting the RegExp thats being used for the matching, this fixes a potential bug that caused `name.arr` to be mistakenly excluded.1 parent f9905f8 commit e18d66c
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
0 commit comments