提交 ef592066 编写于 作者: B Benjamin Pasero

Menu: keybinding Cmd+O does not show up in File menu (fixes #40145)

上级 76662d7b
......@@ -1097,11 +1097,6 @@ export class CodeMenu {
const enabled = typeof arg3 === 'boolean' ? arg3 : this.windowsMainService.getWindowCount() > 0;
const checked = typeof arg4 === 'boolean' ? arg4 : false;
let commandId: string;
if (typeof arg2 === 'string') {
commandId = arg2;
}
const options: Electron.MenuItemConstructorOptions = {
label,
click,
......@@ -1113,6 +1108,13 @@ export class CodeMenu {
options['checked'] = checked;
}
let commandId: string;
if (typeof arg2 === 'string') {
commandId = arg2;
} else if (Array.isArray(arg2)) {
commandId = arg2[0];
}
return new MenuItem(this.withKeybinding(commandId, options));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册