From b775fe06b92401e4b0b9fa2f85e735d2ebfbf75f Mon Sep 17 00:00:00 2001 From: "d.a.kolesov" Date: Mon, 6 Apr 2026 15:47:47 +0700 Subject: [PATCH] =?UTF-8?q?fix/compose:=20=D0=B1=D0=B5=D0=B7=D0=BE=D0=BF?= =?UTF-8?q?=D0=B0=D1=81=D0=BD=D1=8B=D0=B9=20fallback=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=BE=D0=BA=D0=BD=D0=B0=20=D0=B2=20compose:pickFiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/main/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index f7fff00..1c31fc4 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -57,8 +57,8 @@ ipcMain.handle('compose:getData', (event) => { }) ipcMain.handle('compose:pickFiles', async (event) => { - const win = BrowserWindow.fromWebContents(event.sender) ?? undefined - const result = await dialog.showOpenDialog(win!, { + const win = BrowserWindow.fromWebContents(event.sender) + const result = await dialog.showOpenDialog(win ?? app.focusedWindow() ?? BrowserWindow.getAllWindows()[0], { properties: ['openFile', 'multiSelections'], title: 'Прикрепить файлы' })