Skip to content

Commit 688afd2

Browse files
qmoreltannerlinsley
authored andcommitted
[refs TanStack#321]: correct makePathArray function in utils (TanStack#326)
1 parent bbebf02 commit 688afd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ function isArray (a) {
152152

153153
function makePathArray (obj) {
154154
return flattenDeep(obj)
155-
.join('.')
156-
.replace('[', '.')
157-
.replace(']', '')
158-
.split('.')
155+
.join('.')
156+
.replace(/\[/g, '.')
157+
.replace(/\]/g, '')
158+
.split('.')
159159
}
160160

161161
function flattenDeep (arr, newArr = []) {

0 commit comments

Comments
 (0)