Refactor buffer constructor (#2489)

This commit is contained in:
Noel Yoo
2018-10-01 23:25:40 +09:00
committed by Chris Breiding
parent 5019787aac
commit 999c217751
7 changed files with 16 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ module.exports = {
if req.url.includes("replace")
write = res.write
res.write = (chunk) ->
chunk = new Buffer(chunk.toString().replace("https server", "replaced content"))
chunk = Buffer.from(chunk.toString().replace("https server", "replaced content"))
write.call(@, chunk)