We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c82753c commit c849467Copy full SHA for c849467
lib/adapters/http.js
@@ -10,7 +10,6 @@ var httpsFollow = require('follow-redirects').https;
10
var url = require('url');
11
var zlib = require('zlib');
12
var pkg = require('./../../package.json');
13
-var Buffer = require('buffer').Buffer;
14
var createError = require('../core/createError');
15
var enhanceError = require('../core/enhanceError');
16
@@ -30,7 +29,7 @@ module.exports = function httpAdapter(config) {
30
29
}
31
32
if (data && !utils.isStream(data)) {
33
- if (utils.isBuffer(data)) {
+ if (Buffer.isBuffer(data)) {
34
// Nothing to do...
35
} else if (utils.isArrayBuffer(data)) {
36
data = new Buffer(new Uint8Array(data));
0 commit comments