Skip to content

Commit cbf5c54

Browse files
authored
fix: return array on wildcard selector (#20)
1 parent 6b11e86 commit cbf5c54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const JSONPath = {
115115
eval: false,
116116
...options,
117117
})
118-
if (path.includes('..') || path.includes('[*]')) {
118+
if (path.includes('..') || path.includes('[*]') || path.includes('.*')) {
119119
return (result ?? []) as JSONPathValue<T, P>
120120
}
121121
return result as JSONPathValue<T, P>

0 commit comments

Comments
 (0)