eca57c85ef77e84d30e797b3553bfc751ee728bb
registerSpellcheck()'s invoke-handler registration guard checked ipcMain.eventNames(), which only reflects .on()/.once() listeners -- handlers registered via ipcMain.handle() never show up there, so the guard was a no-op. With closeToTray disabled (or any other path that lets the main window actually close instead of hide), a second createWindow() call would hit "Attempted to register a second handler for 'spellcheck-get-state'", aborting window setup partway through and leaving a blank window. Use a real module-level flag instead, matching the pattern already used for this file's .on() listeners.
Languages
Rust
61%
TypeScript
25.1%
JavaScript
13.6%