Skip to content

Commit

Permalink
Fix Buffer deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidka committed Apr 9, 2019
1 parent c2cd574 commit 43a0307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function sendRequest(xml, callback) {

return response.on("end", function() {
let offset = 0;
body = new Buffer(bytes);
body = Buffer.allocUnsafe(bytes);

chunks.forEach(function(chunk) {
chunk.copy(body, offset, 0, chunk.length);
Expand Down

0 comments on commit 43a0307

Please sign in to comment.