Skip to content

Commit

Permalink
refactor: switch to .values()
Browse files Browse the repository at this point in the history
  • Loading branch information
thetayloredman committed Feb 18, 2023
1 parent 88e6a0d commit 83d953f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,6 @@ export default class Stream extends SafeEventEmitter<StreamEventArguments> {
} /* istanbul ignore next: this should never happen */ else
throw new Error(`Unrecognized control character returned by _bestControlCharacter for size ${remainder}`);
}
return Buffer.from(results.flat().flatMap((x) => (x instanceof Buffer ? Array.from(x.entries()).map(([_, v]) => v) : x)));
return Buffer.from(results.flat().flatMap((x) => (x instanceof Buffer ? Array.from(x.values()) : x)));
}
}

0 comments on commit 83d953f

Please sign in to comment.