v1.18.x
barisusakli 9 years ago
parent 099d05e295
commit 5b530253bb

@ -207,11 +207,8 @@ var fs = require('fs'),
require('request')(url, { require('request')(url, {
json: true json: true
}, function(err, res, body) { }, function(err, res, body) {
var plugins = [];
if (err) { if (err) {
winston.error('Error parsing plugins : ' + err.message); winston.error('Error parsing plugins : ' + err.message);
plugins = [];
} }
Plugins.normalise(body, callback); Plugins.normalise(body, callback);
@ -220,8 +217,8 @@ var fs = require('fs'),
Plugins.normalise = function(apiReturn, callback) { Plugins.normalise = function(apiReturn, callback) {
var pluginMap = {}, var pluginMap = {},
dependencies = require.main.require('./package.json').dependencies; var dependencies = require.main.require('./package.json').dependencies;
apiReturn = apiReturn || [];
for(var i=0; i<apiReturn.length; ++i) { for(var i=0; i<apiReturn.length; ++i) {
apiReturn[i].id = apiReturn[i].name; apiReturn[i].id = apiReturn[i].name;
apiReturn[i].installed = false; apiReturn[i].installed = false;

Loading…
Cancel
Save