clear update info so that we use the latest settings

This commit is contained in:
Girish Ramakrishnan
2016-01-23 11:08:01 -08:00
parent 8ad190fa83
commit 0eaa3a8d94

View File

@@ -134,6 +134,8 @@ function checkAppUpdates(callback) {
debug('Checking App Updates');
gAppUpdateInfo = { };
getAppUpdates(function (error, updateInfo) {
if (error) return callback(error);
@@ -143,8 +145,6 @@ function checkAppUpdates(callback) {
var oldState = loadState();
var newState = { box: oldState.box }; // create new state so that old app ids are removed
gAppUpdateInfo = { };
async.eachSeries(Object.keys(updateInfo), function iterator(id, iteratorDone) {
var isPrerelease = semver.parse(updateInfo[id].manifest.version).prerelease.length !== 0;
@@ -185,6 +185,8 @@ function checkBoxUpdates(callback) {
debug('Checking Box Updates');
gBoxUpdateInfo = null;
getBoxUpdates(function (error, updateInfo) {
if (error || !updateInfo) return callback(error);