Skip to content

Commit

Permalink
fix: don't return promise in async function
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Apr 26, 2022
1 parent 678b4c4 commit 6099c4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/encoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function createEncoder (writer) {
* @returns {Promise<void>}
*/
async close () {
return writer.end()
await writer.end()
/* c8 ignore next 2 */
// Node.js 12 c8 bug
}
Expand Down
2 changes: 1 addition & 1 deletion lib/iterator-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function create () {
ended = true
const drainer = makeDrainer()
outWaitResolver()
return drainer
await drainer
/* c8 ignore next 2 */
// Node.js 12 c8 bug
}
Expand Down

0 comments on commit 6099c4b

Please sign in to comment.