🔀 Merge pull request #158 from RicardoE105/fix/removed-deprecation-warning

Fix/removed deprecation warning
This commit is contained in:
Jan 2019-12-19 16:17:04 -06:00 committed by GitHub
commit 99c13249db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,7 +267,7 @@ export class MoveBinaryData implements INodeType {
}
const encoding = (options.encoding as string) || 'utf8';
let convertedValue = new Buffer(value.data, 'base64').toString(encoding);
let convertedValue = Buffer.from(value.data, 'base64').toString(encoding);
if (setAllData === true) {
// Set the full data
@ -321,7 +321,7 @@ export class MoveBinaryData implements INodeType {
}
const convertedValue = {
data: new Buffer(value as string).toString('base64'),
data: Buffer.from(value as string).toString('base64'),
mimeType: options.mimeType || 'application/json',
};
set(newItem.binary!, destinationKey, convertedValue);