]> zoso.dev Git - buffer.git/commitdiff
buf.constructor = Buffer
authorFeross Aboukhadijeh <feross@feross.org>
Wed, 29 Oct 2014 04:13:18 +0000 (21:13 -0700)
committerFeross Aboukhadijeh <feross@feross.org>
Wed, 29 Oct 2014 04:13:18 +0000 (21:13 -0700)
Change made for
https://github.com/hapijs/qs/issues/39#issuecomment-60427477

index.js

index bf25e09cb4473b8cabd3bad0c954c6cac6e7c204..03bce7abc963447b0953b2bb015d145a5599551d 100644 (file)
--- a/index.js
+++ b/index.js
@@ -906,6 +906,7 @@ var BP = Buffer.prototype
  * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
  */
 Buffer._augment = function (arr) {
+  arr.constructor = Buffer
   arr._isBuffer = true
 
   // save reference to original Uint8Array get/set methods before overwriting