diff --git a/common/base64.js b/common/base64.js index 4d09b256..88365c6b 100644 --- a/common/base64.js +++ b/common/base64.js @@ -3,7 +3,7 @@ const isFn = (a) => typeof a === 'function'; module.exports.btoa = (str) => { - if (isFn(btoa)) + if (typeof btoa === 'function') return btoa(str); return Buffer