Skip to content

Commit 480f809

Browse files
author
David Desmarais
committed
fixed bug
1 parent 848ed62 commit 480f809

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jsonStreamify.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ class JSONStreamify extends CoStream {
4242
// Non Object Mode are emitted as a concatinated string
4343
yield this.push('"');
4444
yield obj.value.pipe(new Transform({
45-
transform: (data, enc, next) => next(null, JSON.stringify(data.toString()).slice(1, -1))
45+
transform: (data, enc, next) => {
46+
this.push(JSON.stringify(data.toString()).slice(1, -1));
47+
next(null);
48+
}
4649
}));
4750
yield this.push('"');
4851
continue;

0 commit comments

Comments
 (0)