File tree Expand file tree Collapse file tree
src/vs/platform/actions/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -473,14 +473,13 @@ export function registerAction2(ctor: { new(): Action2 }): IDisposable {
473473
474474 // menu
475475 if ( Array . isArray ( menu ) ) {
476- for ( let item of menu ) {
477- disposables . add ( MenuRegistry . appendMenuItem ( item . id , { command : { ...command } , ...item } ) ) ;
478- }
476+ disposables . add ( MenuRegistry . appendMenuItems ( menu . map ( item => ( { id : item . id , item : { command, ...item } } ) ) ) ) ;
477+
479478 } else if ( menu ) {
480- disposables . add ( MenuRegistry . appendMenuItem ( menu . id , { command : { ... command } , ...menu } ) ) ;
479+ disposables . add ( MenuRegistry . appendMenuItem ( menu . id , { command, ...menu } ) ) ;
481480 }
482481 if ( f1 ) {
483- disposables . add ( MenuRegistry . appendMenuItem ( MenuId . CommandPalette , { command : command } ) ) ;
482+ disposables . add ( MenuRegistry . appendMenuItem ( MenuId . CommandPalette , { command } ) ) ;
484483 }
485484
486485 // keybinding
You can’t perform that action at this time.
0 commit comments