Skip to content

Commit db383e5

Browse files
authored
Fix existence check when contributing monaco menu items (#15746)
Fixes #15691 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
1 parent 97ce260 commit db383e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/monaco/src/browser/monaco-menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class MonacoEditorMenuContribution implements MenuContribution {
4949
if (commandId) {
5050
const nodeId = MonacoCommands.COMMON_ACTIONS.get(commandId) || commandId;
5151
const menuPath = item.group ? [...EDITOR_CONTEXT_MENU, item.group] : EDITOR_CONTEXT_MENU;
52-
if (registry.getMenuNode([...menuPath, nodeId])) {
52+
if (!registry.getMenuNode([...menuPath, nodeId])) {
5353
// Don't add additional actions if the item is already registered.
5454
registry.registerMenuAction(menuPath, this.buildMenuAction(commandId, item));
5555
}

0 commit comments

Comments
 (0)