未验证 提交 6c5e91de 编写于 作者: L Lucia Sarni 提交者: GitHub

fix: deprecate from "new Buffer" to "Buffer.from" (#6489)

上级 aa53ec24
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册