From e01f4dbf1393a789faaa2f38b53d2effad827e86 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 11 Jan 2020 13:08:29 +0200 Subject: Change Buffer to Buffer.alloc on Node v12. Try to fix Snap. --- models/export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models/export.js') diff --git a/models/export.js b/models/export.js index cc979ce0..69aaf619 100644 --- a/models/export.js +++ b/models/export.js @@ -138,7 +138,7 @@ export class Exporter { // [Old] for attachments we only export IDs and absolute url to original doc // [New] Encode attachment to base64 const getBase64Data = function(doc, callback) { - let buffer = new Buffer(0); + let buffer = new Buffer.alloc(0); // callback has the form function (err, res) {} const tmpFile = path.join( os.tmpdir(), -- cgit v1.2.3-1-g7c22