add err arg

This commit is contained in:
Iuri Matias 2017-12-15 22:06:33 -05:00
parent 510bc2c542
commit e88b51bdfd
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class Npm {
let self = this;
let npmRegistry = "https://registry.npmjs.org/" + packageName + "/" + version;
utils.httpsGet(npmRegistry, function (body) {
utils.httpsGet(npmRegistry, function (_err, body) {
let registryJSON = JSON.parse(body);
let tarball = registryJSON.dist.tarball;

View File

@ -43,7 +43,7 @@ function httpsGet(url, callback) {
body += d;
});
res.on('end', function () {
callback(body);
callback(null, body);
});
});
}