1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-26 18:58:21 +02:00

Desktop: Regression: Context menu in sidebar could point to wrong item

This commit is contained in:
Laurent Cozic 2020-10-11 19:37:12 +01:00
parent 02ed297529
commit 80a70a6649
2 changed files with 1 additions and 3 deletions

View File

@ -25,7 +25,6 @@ export interface CommandRuntime {
// Used for the (optional) toolbar button title
title?(props:any):string,
// props?:any
}
export interface CommandDeclaration {

View File

@ -88,10 +88,9 @@ export default class MenuUtils {
}
public commandToStatefulMenuItem(commandName:string, props:any = null):MenuItem {
const output = this.commandsToMenuItems([commandName], () => {
return this.commandToMenuItem(commandName, () => {
return this.service.execute(commandName, props ? props : {});
});
return output[commandName];
}
public commandsToMenuItems(commandNames:string[], onClick:Function):MenuItems {