From: Kirill Fomichev Date: Mon, 17 Oct 2016 09:45:45 +0000 (+0300) Subject: change style of condition in createBuffer X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=64a939458dec5f2fe5029851c973fbbc146fa8ce;p=buffer.git change style of condition in createBuffer --- diff --git a/index.js b/index.js index 4957287..7baf22a 100644 --- a/index.js +++ b/index.js @@ -52,7 +52,7 @@ function typedArraySupport () { } function createBuffer (length) { - if (K_MAX_LENGTH < length) { + if (length > K_MAX_LENGTH) { throw new RangeError('Invalid typed array length') } // Return an augmented `Uint8Array` instance