refactor: new is not necessary

https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding
This commit is contained in:
weyusi 2019-05-02 16:34:11 +09:30
parent cdee4c0768
commit a87dd05ff4
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ function logicBrotli () {
assetPath.on('end', () => { assetPath.on('end', () => {
if (assetTxt.length) { if (assetTxt.length) {
// Input has to be buffer for brotli // 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 // brotli defaults to max compression level
br.compress(input, (err, output) => { br.compress(input, (err, output) => {
if (!err) { if (!err) {