Преглед изворни кода

Removed mention of Buffer in byteSourceToUint8Array

The Closure compiler complains about Buffer since that class exists only
in Node. That logic does not seem to be needed (unit tests and conformance
tests pass without it), so let's just remove it to solve the problem.
Adam Cozzette пре 8 година
родитељ
комит
f00e06c95b
1 измењених фајлова са 0 додато и 4 уклоњено
  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));