Removed 'new Buffer'
This commit is contained in:
parent
f35a8a4714
commit
e40b28e52a
|
@ -16,7 +16,7 @@ export function get(url, options = {}, callback) {
|
|||
|
||||
Remote.https.get(url, options, (error, res, body) => {
|
||||
if (error) return emitter.emit("error", error);
|
||||
emitter.emit("data", options && options.encoding === "binary" ? new Buffer(Buffer.from(body, "binary")) : body);
|
||||
emitter.emit("data", options && options.encoding === "binary" ? Buffer.from(body, "binary") : body);
|
||||
emitter.emit("end", res);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue