Skip to content

Commit 678ee45

Browse files
committed
Fix
1 parent 5695588 commit 678ee45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

json-parse-stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class JSONParseStream<T = any> extends TransformStream<string | Uint8Arra
2525

2626
if (match(expr, path)) {
2727
controller.enqueue(value as any);
28-
} else if (expr.startsWith(path)) {
28+
} else if (expr.startsWith(path + ';')) {
2929
controller.terminate()
3030
}
3131
};
@@ -60,7 +60,7 @@ export class JSONParseNexus<T = any> extends TransformStream<string | Uint8Array
6060
if (match(expr, path)) {
6161
this.#queues.get(expr)!.enqueue(value)
6262
} // no else if => can both be true
63-
if (expr.startsWith(path)) {
63+
if (expr.startsWith(path + ';')) {
6464
remove(this.#queues, expr)!.close()
6565
}
6666
}

0 commit comments

Comments
 (0)