From 2d92ab6ac12016dd3e219aa5e114924762788ba1 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 28 Oct 2014 21:13:18 -0700 Subject: [PATCH] buf.constructor = Buffer Change made for https://github.com/hapijs/qs/issues/39#issuecomment-60427477 --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index bf25e09..03bce7a 100644 --- 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 -- 2.34.1