[Updater > App] Fix error for updater v2
This commit is contained in:
parent
9db4c31be2
commit
36d9a091fd
1 changed files with 6 additions and 6 deletions
|
@ -13,16 +13,16 @@ const { initSplash, focusWindow, APP_SHOULD_LAUNCH, APP_SHOULD_SHOW, events: spl
|
||||||
|
|
||||||
exports.update = (startMin, done, show) => {
|
exports.update = (startMin, done, show) => {
|
||||||
if (updater.tryInitUpdater(buildInfo, NEW_UPDATE_ENDPOINT)) {
|
if (updater.tryInitUpdater(buildInfo, NEW_UPDATE_ENDPOINT)) {
|
||||||
const updater = updater.getUpdater();
|
const inst = updater.getUpdater();
|
||||||
|
|
||||||
updater.on('host-updated', () => {
|
inst.on('host-updated', () => {
|
||||||
autostartUpdate(() => {});
|
autostartUpdate(() => {});
|
||||||
});
|
});
|
||||||
updater.on('unhandled-exception', fatal);
|
inst.on('unhandled-exception', fatal);
|
||||||
updater.on(updater.INCONSISTENT_INSTALLER_STATE_ERROR, fatal);
|
inst.on(updater.INCONSISTENT_INSTALLER_STATE_ERROR, fatal);
|
||||||
updater.on('update-error', handled);
|
inst.on('update-error', handled);
|
||||||
|
|
||||||
performFirstRunTasks(updater);
|
performFirstRunTasks(inst);
|
||||||
} else {
|
} else {
|
||||||
moduleInit(UPDATE_ENDPOINT, settings, buildInfo);
|
moduleInit(UPDATE_ENDPOINT, settings, buildInfo);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue