Do not crash if a boxVersionsUrl is not set

This prevents test failures when the cron job runs
This commit is contained in:
Johannes Zellner
2015-10-13 13:20:28 +02:00
parent 6c667e4325
commit 3787dd98b4

View File

@@ -81,6 +81,9 @@ function getAppUpdates(callback) {
function getBoxUpdates(callback) {
var currentVersion = config.version();
// do not crash if boxVersionsUrl is not set
if (!config.get('boxVersionsUrl')) return callback(null, null);
superagent
.get(config.get('boxVersionsUrl'))
.timeout(10 * 1000)