mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-23 03:31:56 +00:00
enterprise: Quit app after showing error for invalid global config.
Otherwise, the error will keep showing multiple times ultimately leading to a non-working app after multiple errors.
This commit is contained in:
committed by
Tim Abbott
parent
e5680b12f4
commit
51ff949d34
@@ -1,3 +1,4 @@
|
|||||||
|
import {app} from "electron/main";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import process from "node:process";
|
import process from "node:process";
|
||||||
@@ -47,6 +48,11 @@ function reloadDatabase(): void {
|
|||||||
);
|
);
|
||||||
logger.log("Error while JSON parsing global_config.json: ");
|
logger.log("Error while JSON parsing global_config.json: ");
|
||||||
logger.log(error);
|
logger.log(error);
|
||||||
|
// This function is called multiple times throughout the
|
||||||
|
// codebase, making the above dialog.showErrorBox appear
|
||||||
|
// multiple times and then leading to a non-working app.
|
||||||
|
// It might be better to quit the app instead.
|
||||||
|
app.quit();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
configFile = false;
|
configFile = false;
|
||||||
|
Reference in New Issue
Block a user