Skip to content

Commit

Permalink
[TIMOB-26081] Fix Buffer deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Jun 5, 2018
1 parent 937cf5b commit fd207d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ AndroidModuleBuilder.prototype.jsToC = function (next) {

if (fs.existsSync(jsBootstrapFile)) {

const str = new Buffer(fs.readFileSync(jsBootstrapFile)); // eslint-disable-line security/detect-new-buffer
const str = Buffer.from(fs.readFileSync(jsBootstrapFile));

[].forEach.call(str, function (char) {
result.push(char);
Expand Down
2 changes: 1 addition & 1 deletion iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5480,7 +5480,7 @@ iOSBuilder.prototype.copyResources = function copyResources(next) {
const buf = [];
this.pack()
.on('data', function (bytes) {
buf.push(new Buffer(bytes)); // eslint-disable-line security/detect-new-buffer
buf.push(Buffer.from(bytes));
})
.on('end', function (err) {
if (err) {
Expand Down

0 comments on commit fd207d0

Please sign in to comment.