Skip to content

Commit 028ffdb

Browse files
committed
[jsonpath] Dot notation before bracket notation is not valid
Related issue: uBlockOrigin/uBlock-issues#4052
1 parent 3abd5c9 commit 028ffdb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/js/jsonpath.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ export class JSONPath {
254254
continue;
255255
}
256256
// Bracket accessor syntax
257+
if ( mv === this.#CHILDREN ) { return; }
257258
if ( query.startsWith('[?', i) ) {
258259
const not = query.charCodeAt(i+2) === 0x21 /* ! */ ? 1 : 0;
259260
const j = i + 2 + not;

0 commit comments

Comments
 (0)