diff --git a/src/functions.js b/src/functions.js index 00a6b87f..5b7bfb88 100644 --- a/src/functions.js +++ b/src/functions.js @@ -581,7 +581,7 @@ const functions = (() => { // Simply doing `new Buffer` at this point causes Browserify to pull // in the entire Buffer browser library, which is large and unnecessary. // Using `global.Buffer` defeats this. - return new global.Buffer(str, 'base64').toString('binary'); + return new global.Buffer.from(str, 'base64').toString('binary'); // eslint-disable-line new-cap }; return atob(str); }