From: Feross Aboukhadijeh Date: Tue, 16 Feb 2016 07:11:49 +0000 (-0800) Subject: add explanatory comment for #97 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=f2ee6de291f193d55b7269afb9e66b2d282632a3;p=buffer.git add explanatory comment for #97 --- diff --git a/index.js b/index.js index 145d3cb..550c56f 100644 --- a/index.js +++ b/index.js @@ -225,8 +225,11 @@ if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.__proto__ = Uint8Array if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { - Object.defineProperty(Buffer, Symbol.species, - { value: null, configurable: true }) + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) } } else { // pre-set for values that may exist in the future