From 81e340d445fa67c6ea0b08091ee94b61a14b706b Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Fri, 27 Jun 2025 21:50:23 +0200 Subject: [PATCH] fix: expose ElectronAPI to window in preload script - Add window.ea = ea to make ElectronAPI available for ipc-event.ts - Fixes 'Cannot read properties of undefined (reading on)' error in Electron build - Ensures proper IPC communication between renderer and main process --- electron/preload.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electron/preload.ts b/electron/preload.ts index d15af0f81..0738425b7 100644 --- a/electron/preload.ts +++ b/electron/preload.ts @@ -110,3 +110,6 @@ const ea: ElectronAPI = { request, ) as Promise, }; + +// Expose ea to window for ipc-event.ts +(window as any).ea = ea;