diff --git a/src/splash/index.js b/src/splash/index.js index 0665d87..b3f7faa 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -172,7 +172,6 @@ class UIProgress { // Generic class to track updating and sent states to splash return true; } } - } const updateUntilCurrent = async () => { @@ -221,13 +220,11 @@ const updateUntilCurrent = async () => { } } catch (e) { log('Splash', 'Update failed', e); - await new Promise(res => { - scheduleNextUpdate(res); - sendState(UPDATE_FAILURE); - }); + sendState(UPDATE_FAILURE); + await new Promise(res => scheduleNextUpdate(res)); } } -} +}; const initModuleUpdater = () => { // "Old" (not v2 / new, win32 only) const add = (event, listener) => { @@ -315,4 +312,4 @@ const scheduleNextUpdate = (callback = moduleUpdater.checkForUpdates) => { // Us const wait = Math.min(updateAttempt * 10, 60); splashState.seconds = wait; setTimeout(callback, wait * 1000); -}; \ No newline at end of file +};