From: Feross Aboukhadijeh Date: Tue, 13 Aug 2019 07:05:56 +0000 (-0700) Subject: add missing `new` X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=e1071693d21c192681fd279b8826350aaf567a32;p=buffer.git add missing `new` --- diff --git a/index.js b/index.js index 52ec240..97a6f98 100644 --- a/index.js +++ b/index.js @@ -127,7 +127,7 @@ function from (value, encodingOrOffset, length) { } if (value == null) { - throw TypeError( + throw new TypeError( 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + (typeof value) )