diff --git a/lib/response.js b/lib/response.js index 9733cf89a..672e0ea93 100644 --- a/lib/response.js +++ b/lib/response.js @@ -5,7 +5,6 @@ var http = require('http'); var sprintf = require('util').format; var url = require('url'); -var util = require('util'); var assert = require('assert-plus'); var mime = require('mime'); @@ -446,7 +445,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'; }