From: Feross Aboukhadijeh Date: Tue, 22 Jul 2014 06:07:36 +0000 (-0700) Subject: firefox 3-3.6, ie6-8: use shim instead of Array.isArray X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=489dad0e1edc79b292b0d27beb5785a457e29522;p=buffer.git firefox 3-3.6, ie6-8: use shim instead of Array.isArray --- diff --git a/index.js b/index.js index 1955cbc..73516cd 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,7 @@ function Buffer (subject, encoding, noZero) { subject = base64clean(subject) length = Buffer.byteLength(subject, encoding) } else if (type === 'object' && subject !== null) { // assume object is array-like - if (subject.type === 'Buffer' && Array.isArray(subject.data)) + if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data length = +subject.length > 0 ? Math.floor(+subject.length) : 0 } else