json array writer fix

This commit is contained in:
Jan Prochazka
2021-06-06 13:49:39 +02:00
parent 40440e957a
commit 7467dd2f10

View File

@@ -30,12 +30,13 @@ class StringifyStream extends stream.Transform {
done(); done();
} }
_flush() { _flush(done) {
if (!this.wasRecord) { if (!this.wasRecord) {
this.push('[]\n'); this.push('[]\n');
} else { } else {
this.push('\n]\n'); this.push('\n]\n');
} }
done();
} }
} }