Fixes: https://github.com/feross/buffer/issues/152
*/
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
-if (!Buffer.TYPED_ARRAY_SUPPORT) {
+if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
+ typeof console.error === 'function') {
console.error(
'This browser lacks typed array (Uint8Array) support which is required by ' +
- '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.')
+ '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
+ )
}
function typedArraySupport () {