Merge pull request #3043 from acozzette/javascript

Removed mention of Buffer in byteSourceToUint8Array
This commit is contained in:
Adam Cozzette 2017-05-04 12:21:14 -07:00 committed by GitHub
commit 483396068d

View File

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