diff --git a/index.js b/index.js index 15d7c50f..fee0dc7c 100644 --- a/index.js +++ b/index.js @@ -217,6 +217,11 @@ function fromJsonObject (that, object) { if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, + { value: null, configurable: true }) + } } else { // pre-set for values that may exist in the future Buffer.prototype.length = undefined