mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
server-esm: Make crash async
This commit is contained in:
@@ -125,11 +125,10 @@ function escapeRegExp(str: string) {
|
||||
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
||||
}
|
||||
|
||||
function crash() {
|
||||
async function crash() {
|
||||
if (isElectron()) {
|
||||
require('electron').app.exit(1);
|
||||
}
|
||||
else {
|
||||
(await import("electron")).app.exit(1);
|
||||
} else {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user