Permalink
Browse files

AutoUpdate : Fix for Update Failed message coming up on app relaunch,…

… even when the update is successful. (#14230)
  • Loading branch information...
mbhavi authored and navch committed Apr 20, 2018
1 parent 6809a38 commit 40650ea62288af049c698227af8158de6c8afe2d
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/extensions/default/AutoUpdate/main.js
@@ -334,7 +334,15 @@ define(function (require, exports, module) {
initializeState()
.done(function () {
- postMessageToNode(MessageIds.INITIALIZE_STATE, _updateParams);
+ var initNodeFn = function () {
+ postMessageToNode(MessageIds.INITIALIZE_STATE, _updateParams);
+ };
+
+ if (updateJsonHandler.get('latestBuildNumber') !== _updateParams.latestBuildNumber) {
+ setUpdateStateInJSON('latestBuildNumber', _updateParams.latestBuildNumber, initNodeFn);
+ } else {
+ initNodeFn();
+ }
})
.fail(function () {
UpdateInfoBar.showUpdateBar({

0 comments on commit 40650ea

Please sign in to comment.