Skip to content

Commit

Permalink
Unified usage of ArrayBuffer.isView to comprehend Buffer and removed …
Browse files Browse the repository at this point in the history
…isView function check

Co-authored-by: Wes Todd <[email protected]>
  • Loading branch information
alexandercerutti and wesleytodd authored Jan 20, 2025
1 parent c4cf614 commit 67c52c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ res.send = function send(body) {
case 'object':
if (chunk === null) {
chunk = '';
} else if (Buffer.isBuffer(chunk) || (typeof ArrayBuffer.isView === "function" && ArrayBuffer.isView(chunk))) {
} else if (ArrayBuffer.isView(chunk)) {
if (!this.get('Content-Type')) {
this.type('bin');
}
Expand Down

0 comments on commit 67c52c3

Please sign in to comment.