utils.js: Fix closure compiler error
Apply changes from this commit:
"Integrated internal changes from Google"
13fd045dbb
This commit is contained in:
parent
3cb0aeca93
commit
da775bcb38
@ -971,8 +971,9 @@ jspb.utils.byteSourceToUint8Array = function(data) {
|
|||||||
return /** @type {!Uint8Array} */(new Uint8Array(data));
|
return /** @type {!Uint8Array} */(new Uint8Array(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.constructor === Buffer) {
|
if (typeof Buffer != 'undefined' && data.constructor === Buffer) {
|
||||||
return /** @type {!Uint8Array} */(new Uint8Array(data));
|
return /** @type {!Uint8Array} */ (
|
||||||
|
new Uint8Array(/** @type {?} */ (data)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.constructor === Array) {
|
if (data.constructor === Array) {
|
||||||
|
Loading…
Reference in New Issue
Block a user