Skip to content

Commit

Permalink
DEP0005 use Buffer.from
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamKarlMitchell authored May 11, 2019
1 parent 1ace2ae commit f90e4fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/js-examples/addressbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Person_PhoneNumber_Type = addressbookSchemas.Person_PhoneNumber_Type;
function writePackedMessageToStream(writeStream, message) {
const arrayBuffer = message.toPackedArrayBuffer();
// Beacause streams can't handle ArrayBuffers
const buffer = new Buffer(arrayBuffer);
const buffer = Buffer.from(arrayBuffer);
writeStream.write(buffer);
}

Expand Down

0 comments on commit f90e4fe

Please sign in to comment.