fixed regression introduced by earlier fix for #3307

v1.18.x
Julian Lam 10 years ago
parent b73a26f7a6
commit 020de2722f

@ -166,12 +166,14 @@ var fs = require('fs'),
Plugins.get = function(id, callback) {
var url = (nconf.get('registry') || 'https://packages.nodebb.org') + '/api/v1/plugins/' + id;
console.log(url);
require('request')(url, {
json: true
}, function(err, res, body) {
Plugins.normalise([body.payload], function(err, normalised) {
normalised = normalised.filter(function(plugin) {
return plugin.id = id;
});
return callback(err, !err ? normalised[0] : undefined);
});
});
@ -217,8 +219,6 @@ var fs = require('fs'),
pluginMap[plugin.id].installed = true;
pluginMap[plugin.id].error = true;
return next();
} else if (!pluginMap.hasOwnProperty(plugin.id)) {
return next();
}
pluginMap[plugin.id] = pluginMap[plugin.id] || {};

Loading…
Cancel
Save