diff --git a/History.md b/History.md index a8c49162..4a1ac2ec 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,7 @@ # v4.0.3 * [FIXED] Issue where invalid rows were not accounted for when skipRows was set [#317](https://github.com/C2FO/fast-csv/issues/317) +* [FIXED] Issue where readableObjectMode was not set to false when formatting [#319](https://github.com/C2FO/fast-csv/issues/319) # v4.0.2 diff --git a/packages/format/src/CsvFormatterStream.ts b/packages/format/src/CsvFormatterStream.ts index 6eb8c1af..5e773b89 100644 --- a/packages/format/src/CsvFormatterStream.ts +++ b/packages/format/src/CsvFormatterStream.ts @@ -11,7 +11,7 @@ export class CsvFormatterStream extends Transform private hasWrittenBOM = false; public constructor(formatterOptions: FormatterOptions) { - super({ objectMode: formatterOptions.objectMode }); + super({ writableObjectMode: formatterOptions.objectMode }); this.formatterOptions = formatterOptions; this.rowFormatter = new RowFormatter(formatterOptions); // if writeBOM is false then set to true