diff --git a/src/components/App.tsx b/src/components/App.tsx index a7fda3f5e..ea706f66a 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -6240,6 +6240,19 @@ class App extends React.Component { private getContextMenuItems = ( type: "canvas" | "element" | "custom", source?: string, + ): ContextMenuItems => { + const options = this._getContextMenuItems(type, source); + return options.filter( + (item) => + !item || + item === CONTEXT_MENU_SEPARATOR || + this.actionManager.isActionEnabled(item, { guardsOnly: true }), + ); + }; + + private _getContextMenuItems = ( + type: "canvas" | "element" | "custom", + source?: string, ): ContextMenuItems => { const options: ContextMenuItems = []; this.actionManager