mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
fix clientOnly not starting up after async startup added in 2.23 (#3154)
Fixes #3151 app.whenReady() was removed when async changes made, needed for clientonly in electron.js
This commit is contained in:
parent
948910d304
commit
1bd146f52e
@ -23,6 +23,7 @@ _This release is scheduled to be released on 2023-10-01._
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix undefined formatTime method in clock module (#3143)
|
- Fix undefined formatTime method in clock module (#3143)
|
||||||
|
- Fix clientonly startup fails after async added (#3151)
|
||||||
|
|
||||||
## [2.24.0] - 2023-07-01
|
## [2.24.0] - 2023-07-01
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
.then(function (configReturn) {
|
.then(function (configReturn) {
|
||||||
// Pass along the server config via an environment variable
|
// Pass along the server config via an environment variable
|
||||||
const env = Object.create(process.env);
|
const env = Object.create(process.env);
|
||||||
|
env.clientonly = true; // set to pass to electron.js
|
||||||
const options = { env: env };
|
const options = { env: env };
|
||||||
configReturn.address = config.address;
|
configReturn.address = config.address;
|
||||||
configReturn.port = config.port;
|
configReturn.port = config.port;
|
||||||
|
@ -168,6 +168,13 @@ app.on("certificate-error", (event, webContents, url, error, certificate, callba
|
|||||||
callback(true);
|
callback(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (process.env.clientonly) {
|
||||||
|
app.whenReady().then(() => {
|
||||||
|
Log.log("Launching client viewer application.");
|
||||||
|
createWindow();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Start the core application if server is run on localhost
|
// Start the core application if server is run on localhost
|
||||||
// This starts all node helpers and starts the webserver.
|
// 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)) {
|
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].includes(config.address)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user