diff --git a/src/apps.js b/src/apps.js index 39d9c2faf..616890120 100644 --- a/src/apps.js +++ b/src/apps.js @@ -1910,8 +1910,6 @@ function autoupdateApps(updateInfo, auditSource, callback) { // updateInfo is { assert.strictEqual(typeof auditSource, 'object'); assert.strictEqual(typeof callback, 'function'); - if (!updateInfo) return callback(null); - async.eachSeries(Object.keys(updateInfo), function iterator(appId, iteratorDone) { get(appId, function (error, app) { if (error) { diff --git a/src/cron.js b/src/cron.js index 009cf1f0e..d48a7353f 100644 --- a/src/cron.js +++ b/src/cron.js @@ -198,9 +198,10 @@ function autoupdatePatternChanged(pattern, tz) { return; } - if (updateInfo.apps && Object.keys(updateInfo.apps).length > 0) { - debug('Starting app update to %j', updateInfo.apps); - apps.autoupdateApps(updateInfo.apps, auditSource.CRON, NOOP_CALLBACK); + const appUpdateInfo = _.omit(updateInfo, 'box'); + if (Object.keys(appUpdateInfo).length > 0) { + debug('Starting app update to %j', appUpdateInfo); + apps.autoupdateApps(appUpdateInfo, auditSource.CRON, NOOP_CALLBACK); } else { debug('No app auto updates available'); } diff --git a/src/updater.js b/src/updater.js index 941903825..b81d3918c 100644 --- a/src/updater.js +++ b/src/updater.js @@ -1,8 +1,8 @@ 'use strict'; exports = module.exports = { - updateToLatest: updateToLatest, - update: update + updateToLatest, + update }; var apps = require('./apps.js'),