Skip to content

Commit

Permalink
fix: deprecate from "new Buffer" to "Buffer.from" (#6489)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsarni authored Oct 8, 2020
1 parent aa53ec2 commit 6c5e91d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export const btoa = (str) => {
if (str instanceof Buffer) {
buffer = str
} else {
buffer = new Buffer(str.toString(), "utf-8")
buffer = Buffer.from(str.toString(), "utf-8")
}

return buffer.toString("base64")
Expand Down

0 comments on commit 6c5e91d

Please sign in to comment.