mirror of https://github.com/curbengh/hexo-yam
refactor: new is not necessary
https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding
This commit is contained in:
parent
cdee4c0768
commit
a87dd05ff4
|
@ -185,7 +185,7 @@ function logicBrotli () {
|
|||
assetPath.on('end', () => {
|
||||
if (assetTxt.length) {
|
||||
// Input has to be buffer for brotli
|
||||
let input = new Buffer.from(assetTxt, 'utf-8')
|
||||
let input = Buffer.from(assetTxt, 'utf-8')
|
||||
// brotli defaults to max compression level
|
||||
br.compress(input, (err, output) => {
|
||||
if (!err) {
|
||||
|
|
Loading…
Reference in New Issue