From 45bf49c1ba1d6962d2e922ed4266f91f4f79a475 Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sat, 24 Feb 2024 14:30:49 +0800 Subject: [PATCH] fix app.dock is undefined caused issue on windows --- .../ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts | 2 +- packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts b/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts index 89c5a17..f3a1c4b 100644 --- a/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts +++ b/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts @@ -9,7 +9,7 @@ export enum DOWNLOAD_ERROR_EXIT_CODE { } export const checkAndDownloadDependenciesForInit = async () => { process.on('disconnect', () => app.exit()) - app.dock.hide() + app.dock?.hide() let pipe: null | net.Socket = null try { pipe = new net.Socket({ fd: 3 }) diff --git a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts index 409c93d..089f953 100644 --- a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts +++ b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts @@ -25,7 +25,7 @@ export const runAutoChat = async () => { closeBrowserWindow() app.exit() }) - app.dock.hide() + app.dock?.hide() let pipe: null | net.Socket = null try { pipe = new net.Socket({ fd: 3 })