Skip to content

Commit 8491e9c

Browse files
committed
Fix regex-matching in JSONPath
1 parent 01427bd commit 8491e9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/jsonpath.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ export class JSONPath {
416416
break;
417417
}
418418
if ( c === 0x5C /* \ */ && (end+1) < len ) {
419-
parts.push(query.slice(beg, end));
420419
const d = query.charCodeAt(end+1);
421-
if ( d === targetCharCode || d === 0x5C ) {
420+
if ( d === targetCharCode ) {
421+
parts.push(query.slice(beg, end));
422422
end += 1;
423423
beg = end;
424424
}

0 commit comments

Comments
 (0)