Skip to content

Commit 828dd51

Browse files
fix broken tests
1 parent fced209 commit 828dd51

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

libs/core/Converter.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,13 @@ Converter.prototype.flushBuffer = function() {
183183
resultJSONStr=JSON.stringify(resultRow);
184184
}
185185
this.emit("record_parsed", resultRow, row, index);
186-
if (this.recordNum > 0) {
187-
if (this.param.toArrayString) {
188-
this.push(",");
189-
}
190-
this.push(eol);
186+
if (this.param.toArrayString && this.recordNum > 0) {
187+
this.push("," + eol);
191188
}
192189
if (this._options && this._options.objectMode){
193190
this.push(resultRow);
194191
}else{
195-
this.push(resultJSONStr, "utf8");
192+
this.push(resultJSONStr + eol, "utf8");
196193
}
197194
this.recordNum++;
198195
}

0 commit comments

Comments
 (0)