SIGN IN SIGN UP

Fix runtime menu refresh crash when menus not yet received (#9762) (#10070)

refreshMenus() rebuilt the application menu from the module-level
cachedMenus, which is only populated once the renderer sends its menu
definition via the 'setMenus' IPC. When a menu refresh was triggered
before that happened - e.g. an auto-update event, or the user closing
the window while the UI was still loading - cachedMenus was undefined
and bindMenuClicks() crashed with 'Cannot read properties of undefined
(reading map)', surfacing as an uncaught-exception dialog.

Guard refreshMenus() so it bails out when there are no cached menus to
rebuild.

Closes #9762
D
Dave Page committed
4fa95c58afdbfcccb18aeb222e8087f374978cdf
Parent: ed9bf2f
Committed by GitHub <noreply@github.com> on 6/12/2026, 10:08:19 AM