diff --git a/source/image-handler/image-request.js b/source/image-handler/image-request.js index 405ba6313..0f78fea01 100644 --- a/source/image-handler/image-request.js +++ b/source/image-handler/image-request.js @@ -194,7 +194,7 @@ class ImageRequest { if (path !== undefined) { const splitPath = path.split("/"); const encoded = splitPath[splitPath.length - 1]; - const toBuffer = new Buffer(encoded, 'base64'); + const toBuffer = Buffer.from(encoded, 'base64'); try { return JSON.parse(toBuffer.toString('ascii')); } catch (e) { @@ -235,4 +235,4 @@ class ImageRequest { } // Exports -module.exports = ImageRequest; \ No newline at end of file +module.exports = ImageRequest;