Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <hello@matteocollina.com>
  • Loading branch information
mcollina committed Sep 8, 2023
1 parent 8f21f35 commit 07d801d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/core/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,8 @@ function getSocketInfo (socket) {
}

async function * convertIterableToBuffer (iterable) {
for await (let chunk of iterable) {
if (!Buffer.isBuffer(chunk)) {
chunk = Buffer.from(chunk)
}
yield chunk
for await (const chunk of iterable) {
yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)
}
}

Expand Down

0 comments on commit 07d801d

Please sign in to comment.