Fix flush using local vars instead of this-vars
This commit is contained in:
parent
56ac283544
commit
cc9e4c7258
@ -51,11 +51,10 @@ class RegexBlockStream extends Transform{
|
|||||||
}
|
}
|
||||||
|
|
||||||
_flush(next){
|
_flush(next){
|
||||||
if(matchAllOnFlush){ // When requested, we'll match one last time over the remaining buffer
|
if(this.matchAllOnFlush){ // When requested, we'll match one last time over the remaining buffer
|
||||||
let chunk = this.readableBuffer.join('');
|
|
||||||
let chunk = this.readableBuffer.join("");
|
let chunk = this.readableBuffer.join("");
|
||||||
let matches = chunk.match(this.matcher); // Match remaining buffer
|
let matches = chunk.match(this.matcher); // Match remaining buffer
|
||||||
_writeMatches(matches); // Write matches including last element
|
this._writeMatches(matches); // Write matches including last element
|
||||||
}
|
}
|
||||||
|
|
||||||
next(); // Tell system we are done
|
next(); // Tell system we are done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user