]> zoso.dev Git - buffer.git/commitdiff
add explanatory comment for #97
authorFeross Aboukhadijeh <feross@feross.org>
Tue, 16 Feb 2016 07:11:49 +0000 (23:11 -0800)
committerFeross Aboukhadijeh <feross@feross.org>
Tue, 16 Feb 2016 07:11:49 +0000 (23:11 -0800)
index.js

index 145d3cbceaffa7c8b45ea632f471877256a2c682..550c56fd3cd63ef4e07937df5f6db23d4c4604ce 100644 (file)
--- 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