mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 00:21:16 +01:00
Fixed case where plugin upgrade checker crashed
... if no extraneous plugins were installed. Hooray for not testing the null case!
This commit is contained in:
5
nodebb
5
nodebb
@@ -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[]='),
|
||||
|
||||
Reference in New Issue
Block a user