From f00e06c95bc117fb2ed0ca56c96041c93039f1fe Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 2 May 2017 17:13:27 -0700 Subject: 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. --- js/binary/utils.js | 4 ---- 1 file changed, 4 deletions(-) (limited to 'js') diff --git a/js/binary/utils.js b/js/binary/utils.js index df16249e..58f11b54 100644 --- a/js/binary/utils.js +++ b/js/binary/utils.js @@ -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.} */(data); return /** @type {!Uint8Array} */(new Uint8Array(data)); -- cgit v1.2.3