From 3787dd98b40c7269f82ddd15f21a2e612d3478e0 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 13 Oct 2015 13:20:28 +0200 Subject: [PATCH] Do not crash if a boxVersionsUrl is not set This prevents test failures when the cron job runs --- src/updatechecker.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/updatechecker.js b/src/updatechecker.js index f4330ad15..0c6fb2f90 100644 --- a/src/updatechecker.js +++ b/src/updatechecker.js @@ -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)