diff --git a/lib/buffer.js b/lib/buffer.js index 5af10f5f30f6aa..babd63e06f03ba 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -353,8 +353,6 @@ function fromArrayBuffer(obj, byteOffset, length) { if (length !== length) { length = 0; } else if (length > 0) { - length = (length < Number.MAX_SAFE_INTEGER ? - length : Number.MAX_SAFE_INTEGER); if (length > maxLength) throw new RangeError("'length' is out of bounds"); } else {