diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-01-18 16:01:02 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-01-18 16:01:02 +0200 |
commit | 9b905c2833d54cf34d1875148075b2bf756d943a (patch) | |
tree | a6c06bf2ac4c7ee1ddd4975ebcb3924c08afda98 /models/export.js | |
parent | 7efbf30af62182f345f401b1e68e273199fc6939 (diff) | |
download | wekan-9b905c2833d54cf34d1875148075b2bf756d943a.tar.gz wekan-9b905c2833d54cf34d1875148075b2bf756d943a.tar.bz2 wekan-9b905c2833d54cf34d1875148075b2bf756d943a.zip |
Try to fix Node 12 Buffer() deprecation errors.
Thanks to xet7 !
Diffstat (limited to 'models/export.js')
-rw-r--r-- | models/export.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/export.js b/models/export.js index 69aaf619..cd72a6a4 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.alloc(0); + let buffer = Buffer.from(0); // callback has the form function (err, res) {} const tmpFile = path.join( os.tmpdir(), |