]> zoso.dev Git - buffer.git/commitdiff
firefox 3-3.6, ie6-8: use shim instead of Array.isArray
authorFeross Aboukhadijeh <feross@feross.org>
Tue, 22 Jul 2014 06:07:36 +0000 (23:07 -0700)
committerFeross Aboukhadijeh <feross@feross.org>
Tue, 22 Jul 2014 06:07:36 +0000 (23:07 -0700)
index.js

index 1955cbcbf86475d37f0f3e68218e66e5cd98b393..73516cde6b45ccb17923a7107e304e2aaf07039d 100644 (file)
--- 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