makes the dialog box error not display

This commit is contained in:
SiriusXT 2024-09-03 08:49:19 +00:00
parent cef8086419
commit 4113574a43

View File

@ -149,8 +149,7 @@ function startHttpServer() {
// clicking the shortcut, the software icon, or the taskbar icon, or when creating a new window,
// should simply focus on the existing window or open a new one, without displaying an error message.
if ("code" in error && error.code == 'EADDRINUSE') {
const isNewWindow = process.argv.includes('--new-window');
if (isNewWindow || !app.requestSingleInstanceLock()) {
if (process.argv.includes('--new-window') || !app.requestSingleInstanceLock()) {
console.error(message);
process.exit(1);
}