From 4113574a43c389911a4b9b1d603a71c7949b753c Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Tue, 3 Sep 2024 08:49:19 +0000 Subject: [PATCH] makes the dialog box error not display --- src/www.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/www.ts b/src/www.ts index 27f445615..e8ddfc9fc 100644 --- a/src/www.ts +++ b/src/www.ts @@ -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); }