Fixed case where plugin upgrade checker crashed

... if no extraneous plugins were installed. Hooray for not
testing the null case!
v1.18.x
Julian Lam 9 years ago
parent 92b8d66153
commit 13210a91e6

@ -118,8 +118,11 @@ var getRunningPid = function(callback) {
version: async.apply(getCurrentVersion)
}),
function(payload, next) {
var toCheck = Object.keys(payload.plugins);
if (!payload.plugins.length) {
return next(null, []); // no extraneous plugins installed
}
var toCheck = Object.keys(payload.plugins);
request({
method: 'GET',
url: 'https://packages.nodebb.org/api/v1/suggest?version=' + payload.version + '&package[]=' + toCheck.join('&package[]='),

Loading…
Cancel
Save