fix: streaming mode bug
This commit is contained in:
parent
e3c89adaed
commit
bb25b8f562
@ -10,8 +10,8 @@ class ParserWithColumns extends Parser {
|
||||
/** @type {(s: import('csv-parse').Options) => () => ParserWithColumns} */
|
||||
export const makeImpl = c => () => {
|
||||
const parser = new ParserWithColumns(c)
|
||||
parser.once('data', chunk => {
|
||||
parser.columns = chunk;
|
||||
parser.once('readable', () => {
|
||||
parser.columns = parser.read();
|
||||
})
|
||||
return parser
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user