From dc066c8a9fa42752292d47a55244695935a3f939 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 16 Jul 2014 22:25:56 -0700 Subject: [PATCH] simplify Buffer.isBuffer check --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9526e88..b3e3d41 100644 --- a/index.js +++ b/index.js @@ -126,7 +126,7 @@ Buffer.isEncoding = function (encoding) { } Buffer.isBuffer = function (b) { - return !!(b !== null && b !== undefined && b._isBuffer) + return !!(b != null && b._isBuffer) } Buffer.byteLength = function (str, encoding) { -- 2.34.1