Skip to content

Commit

Permalink
Fix checking for update
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 15, 2016
1 parent 4a40d91 commit b2750d3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions electron/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default (mainWindow, icon, notify) => {
icon,
message: err.message,
});
checking = false;
console.log('[Updater]', err.message);
checking = false;
return;
}
if (err || !status) {
Expand All @@ -48,9 +48,9 @@ export default (mainWindow, icon, notify) => {
icon,
message: 'The new version has been released.',
});
checking = false;
if (index === 1) return;
shell.openExternal('https://github.com/jhen0409/react-native-debugger/releases');
checking = false;
console.log('[Updater] Open external link.');
return;
}
Expand All @@ -72,10 +72,8 @@ export default (mainWindow, icon, notify) => {
'Please restart the application to apply the updates.',
detail: `${releaseName}\n\n${releaseNotes}`,
});
if (index === 1) {
checking = false;
return;
}
checking = false;
if (index === 1) return;
updater.install();
});
};

0 comments on commit b2750d3

Please # to comment.