]> zoso.dev Git - buffer.git/commitdiff
fix buf introduced in PR #92
authorFeross Aboukhadijeh <feross@feross.org>
Sat, 9 Jan 2016 14:27:22 +0000 (15:27 +0100)
committerFeross Aboukhadijeh <feross@feross.org>
Sat, 9 Jan 2016 14:27:22 +0000 (15:27 +0100)
index.js

index 79c1198dade20e4fc96142a5c72f568e7018e88d..d028aa50fa718034789db88ccb659e3debe84fbd 100644 (file)
--- a/index.js
+++ b/index.js
@@ -191,7 +191,7 @@ function fromArrayBuffer (that, array) {
     that.__proto__ = Buffer.prototype
   } else {
     // Fallback: Return an object instance of the Buffer class
-    that = fromTypedArray(that, array)
+    that = fromTypedArray(that, new Uint8Array(array))
   }
   return that
 }