[Bootstrap] Minor source cleanup
This commit is contained in:
parent
cd2136a94e
commit
f1e5c62f55
1 changed files with 3 additions and 4 deletions
7
src/bootstrap.js
vendored
7
src/bootstrap.js
vendored
|
@ -47,16 +47,15 @@ const startCore = () => {
|
||||||
|
|
||||||
const i = setImmediate(() => {
|
const i = setImmediate(() => {
|
||||||
if (!global.mainWindowId) return;
|
if (!global.mainWindowId) return;
|
||||||
clearInterval(i);
|
|
||||||
|
|
||||||
const bw = BrowserWindow.fromId(global.mainWindowId);
|
const bw = BrowserWindow.fromId(global.mainWindowId);
|
||||||
|
|
||||||
let donePageReady = false;
|
let done = false;
|
||||||
bw.webContents.on('dom-ready', () => {
|
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
|
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 -
|
const [ channel, hash ] = oaVersion.split('-'); // Split via -
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue