mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-16 18:25:04 -06:00
electron-17: added logic to check dev environment for crashing the renderer process
This commit is contained in:
parent
605c725a08
commit
a647c0d3cd
@ -112,8 +112,14 @@ function createAPI() {
|
||||
|
||||
/**
|
||||
* Provides API to crash the renderer process that calls this function
|
||||
* Is only used for demos.
|
||||
*/
|
||||
crashRendererProcess: function () {
|
||||
// For practical purposes, we don't allow
|
||||
// this method to work in non-dev environments
|
||||
if (!process.env.ELECTRON_DEV) {
|
||||
return;
|
||||
}
|
||||
process.crash();
|
||||
},
|
||||
|
||||
|
@ -195,7 +195,9 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
if (index === 0) {
|
||||
mainWindow.reload();
|
||||
}
|
||||
else mainWindow.close();
|
||||
else {
|
||||
mainWindow.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user