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();
}
_flush() {
_flush(done) {
if (!this.wasRecord) {
this.push('[]\n');
} else {
this.push('\n]\n');
}
done();
}
}