Skip to content

Commit

Permalink
Use Buffer.isBuffer instead of util.isBuffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
NatalieWolfe committed Jan 30, 2018
1 parent 74e0cf5 commit dd5ada0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/response.js
Expand Up @@ -446,7 +446,7 @@ function patch(Response) {

// Set Content-Type to application/json when
// res.send is called with an Object instead of calling res.json
if (!type && typeof body === 'object' && !util.isBuffer(body)) {
if (!type && typeof body === 'object' && !Buffer.isBuffer(body)) {
type = 'application/json';
}

Expand Down

0 comments on commit dd5ada0

Please sign in to comment.