diff --git a/lib/buffer.js b/lib/buffer.js index 951805870c5870..d5f5c43971de86 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -242,10 +242,7 @@ function _copyActual(source, target, targetStart, sourceStart, sourceEnd) { sourceEnd = sourceStart + target.length - targetStart; let nb = sourceEnd - sourceStart; - const targetLen = target.length - targetStart; const sourceLen = source.length - sourceStart; - if (nb > targetLen) - nb = targetLen; if (nb > sourceLen) nb = sourceLen;