diff --git a/lib/main.js b/lib/main.js index e1b5677..573e056 100644 --- a/lib/main.js +++ b/lib/main.js @@ -517,7 +517,7 @@ function coerceToBase64(thing, name) { // ArrayBuffer to Buffer if (thing instanceof ArrayBuffer && !(thing instanceof Buffer)) { - thing = new Buffer(thing); + thing = new Buffer.from(thing); } // Buffer to base64 string