Skip to content

Commit

Permalink
Start menu handler ids at one, not zero (#14282)
Browse files Browse the repository at this point in the history
Fixes #14279

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
  • Loading branch information
tsmaeder authored Oct 10, 2024
1 parent 5f49a29 commit 5058c24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/electron-browser/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const { ipcRenderer, contextBridge } = require('electron');

// a map of menuId => map<handler id => handler>
const commandHandlers = new Map<number, Map<number, () => void>>();
let nextHandlerId = 0;
const mainMenuId = 0;
let nextHandlerId = 1;
const mainMenuId = 1;
let nextMenuId = mainMenuId + 1;

let openUrlHandler: ((url: string) => Promise<boolean>) | undefined;
Expand Down

0 comments on commit 5058c24

Please sign in to comment.