mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
fix electron not running under windows (after async changes) (#3091)
fixes #3083 tested under windows 11 and linux.
This commit is contained in:
@@ -28,6 +28,7 @@ _This release is scheduled to be released on 2023-07-01._
|
||||
### Fixed
|
||||
|
||||
- Fix envcanada hourly forecast time (#3080)
|
||||
- Fix electron not running under windows after async changes (#3083)
|
||||
|
||||
## [2.23.0] - 2023-04-04
|
||||
|
||||
|
@@ -126,13 +126,6 @@ function createWindow() {
|
||||
});
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
app.on("ready", function () {
|
||||
Log.log("Launching application.");
|
||||
createWindow();
|
||||
});
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on("window-all-closed", function () {
|
||||
if (process.env.JEST_WORKER_ID !== undefined) {
|
||||
@@ -178,5 +171,11 @@ app.on("certificate-error", (event, webContents, url, error, certificate, callba
|
||||
// Start the core application if server is run on localhost
|
||||
// This starts all node helpers and starts the webserver.
|
||||
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].includes(config.address)) {
|
||||
core.start().then((c) => (config = c));
|
||||
core.start().then((c) => {
|
||||
config = c;
|
||||
app.whenReady().then(() => {
|
||||
Log.log("Launching application.");
|
||||
createWindow();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user