From 64a939458dec5f2fe5029851c973fbbc146fa8ce Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Mon, 17 Oct 2016 12:45:45 +0300 Subject: [PATCH] change style of condition in createBuffer --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1