From fd3cc955736fe01c061f1bbabb10c09b71466a91 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Mon, 11 Jun 2018 12:17:39 +0200 Subject: [PATCH] Remove unused var buffer_sent --- copy-to.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/copy-to.js b/copy-to.js index 2334459..ad66b45 100644 --- a/copy-to.js +++ b/copy-to.js @@ -44,12 +44,10 @@ CopyStreamQuery.prototype._transform = function(chunk, enc, cb) { var buffer = Buffer.alloc(chunk.length); var buffer_offset = 0; - var buffer_sent = false; this.pushBufferIfneeded = function() { - if(needPush && !buffer_sent && buffer_offset > 0) { + if (needPush && buffer_offset > 0) { this.push(buffer.slice(0, buffer_offset)) - buffer_sent = true; buffer_offset = 0; } }