From 4f1463eb4fcfe9313ece54e581584a8d9b5849bd Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 24 Nov 2021 19:40:46 +0100 Subject: [PATCH] Fixed args being wrong way around --- 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 f06bf6d..120e65f 100644 --- a/src/streamHandler/RegexBlockStream.js +++ b/src/streamHandler/RegexBlockStream.js @@ -32,7 +32,7 @@ class RegexBlockStream extends Transform{ let matches = chunk.match(this.matcher); // Match if(matches){ if(this.withholdLastBlock) matches.pop(); // Remove last if we want to withhold it - chunk = this._writeMatches(chunk, matches); + chunk = this._writeMatches(matches, chunk); } this._buffer = chunk; // Store remaining data in buffer