From bb3d843895a44748aea043817598279cfce2abde Mon Sep 17 00:00:00 2001 From: Ruakij Date: Thu, 25 Nov 2021 18:42:45 +0100 Subject: [PATCH] Fixed wrong joining --- src/streamHandler/RegexBlockStream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streamHandler/RegexBlockStream.js b/src/streamHandler/RegexBlockStream.js index 5868319..ef39a67 100644 --- a/src/streamHandler/RegexBlockStream.js +++ b/src/streamHandler/RegexBlockStream.js @@ -52,7 +52,7 @@ class RegexBlockStream extends Transform{ _flush(next){ if(matchAllOnFlush){ // When requested, we'll match one last time over the remaining buffer - let chunk = this.readableBuffer.toString(); + let chunk = this.readableBuffer.join(''); let matches = chunk.match(this.matcher); // Match remaining buffer _writeMatches(matches); // Write matches including last element }