[Bootstrap] Minor source cleanup

This commit is contained in:
Ducko 2022-03-29 18:21:36 +01:00
parent cd2136a94e
commit f1e5c62f55

7
src/bootstrap.js vendored
View file

@ -47,16 +47,15 @@ const startCore = () => {
const i = setImmediate(() => {
if (!global.mainWindowId) return;
clearInterval(i);
const bw = BrowserWindow.fromId(global.mainWindowId);
let donePageReady = false;
let done = false;
bw.webContents.on('dom-ready', () => {
if (!donePageReady) { // Only run once
if (!done) { // Only run once
splashScreen.pageReady(); // Override Core's pageReady with our own on dom-ready to show main window earlier
donePageReady = true;
done = true;
}
const [ channel, hash ] = oaVersion.split('-'); // Split via -