mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
fixed app termination after unsuccessful migration for electron
This commit is contained in:
@@ -118,6 +118,15 @@ function escapeRegExp(str) {
|
||||
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
||||
}
|
||||
|
||||
function crash() {
|
||||
if (isElectron()) {
|
||||
require('electron').app.exit(1);
|
||||
}
|
||||
else {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
@@ -137,5 +146,6 @@ module.exports = {
|
||||
stripTags,
|
||||
intersection,
|
||||
union,
|
||||
escapeRegExp
|
||||
escapeRegExp,
|
||||
crash
|
||||
};
|
||||
Reference in New Issue
Block a user