Browse Source

Merge pull request #3043 from acozzette/javascript

Removed mention of Buffer in byteSourceToUint8Array
Adam Cozzette 8 năm trước cách đây
mục cha
commit
483396068d
1 tập tin đã thay đổi với 0 bổ sung4 xóa
  1. 0 4
      js/binary/utils.js

+ 0 - 4
js/binary/utils.js

@@ -970,10 +970,6 @@ jspb.utils.byteSourceToUint8Array = function(data) {
     return /** @type {!Uint8Array} */(new Uint8Array(data));
     return /** @type {!Uint8Array} */(new Uint8Array(data));
   }
   }
 
 
-  if (data.constructor === Buffer) {
-    return /** @type {!Uint8Array} */(new Uint8Array(data));
-  }
-
   if (data.constructor === Array) {
   if (data.constructor === Array) {
     data = /** @type {!Array.<number>} */(data);
     data = /** @type {!Array.<number>} */(data);
     return /** @type {!Uint8Array} */(new Uint8Array(data));
     return /** @type {!Uint8Array} */(new Uint8Array(data));