Apply no-buffer-constructor lint rule
This commit is contained in:
1 parent
d85afcd2b5
commit
b43088c03c
6 files changed
+8
-7
No files matched your search
+1
-1
@@ -1058,7 +1058,7 @@ function listener(httpRequest, httpResponse) {
|
||||
});
|
||||
|
||||
stream.on("end", () => {
|
||||
const body = new Buffer(bytes);
|
||||
const body = Buffer.allocUnsafe(bytes);
|
||||
let offset = 0;
|
||||
for (const chunk of chunks) {
|
||||
chunk.copy(body, offset, 0, chunk.length);
|
||||
|
||||
Reference in new issue
Block a user