Skip to content

Commit b3b06d5

Browse files
committed
rest client: stream reader - handle empty arrays
1 parent a5bbdf5 commit b3b06d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ function nodeReadStream<T = unknown>(stream: any) {
712712
text = `${prevTail}${text}`;
713713
prevTail = "";
714714
}
715+
716+
if (text.startsWith("\n\n]")) {
717+
return;
718+
}
715719

716720
let lines = text.split("\n,\n").filter((l) => !!l);
717721
const last = lines[lines.length - 1];

0 commit comments

Comments
 (0)