fix app.dock is undefined caused issue on windows

This commit is contained in:
geekgeekrun
2024-02-25 08:59:54 +08:00
parent 2c549b4d1c
commit 45bf49c1ba
2 changed files with 2 additions and 2 deletions
@@ -9,7 +9,7 @@ export enum DOWNLOAD_ERROR_EXIT_CODE {
} }
export const checkAndDownloadDependenciesForInit = async () => { export const checkAndDownloadDependenciesForInit = async () => {
process.on('disconnect', () => app.exit()) process.on('disconnect', () => app.exit())
app.dock.hide() app.dock?.hide()
let pipe: null | net.Socket = null let pipe: null | net.Socket = null
try { try {
pipe = new net.Socket({ fd: 3 }) pipe = new net.Socket({ fd: 3 })
@@ -25,7 +25,7 @@ export const runAutoChat = async () => {
closeBrowserWindow() closeBrowserWindow()
app.exit() app.exit()
}) })
app.dock.hide() app.dock?.hide()
let pipe: null | net.Socket = null let pipe: null | net.Socket = null
try { try {
pipe = new net.Socket({ fd: 3 }) pipe = new net.Socket({ fd: 3 })