From 7a66ca7b481ad24fe7979c252b18ea978cd97b38 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 8 Jan 2014 20:57:32 -0800 Subject: [PATCH] Fix new buffer from buffer test for Object implementation --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7124b1a..5d1d4be 100644 --- a/index.js +++ b/index.js @@ -81,7 +81,7 @@ function Buffer (subject, encoding, noZero) { } var i - if (Buffer.isBuffer(subject)) { + if (subject instanceof Uint8Array) { // Speed optimization -- use set if we're copying from a Uint8Array buf.set(subject) } else if (isArrayish(subject)) { -- 2.34.1