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:
parent
02ed297529
commit
80a70a6649
@ -25,7 +25,6 @@ export interface CommandRuntime {
|
||||
|
||||
// Used for the (optional) toolbar button title
|
||||
title?(props:any):string,
|
||||
// props?:any
|
||||
}
|
||||
|
||||
export interface CommandDeclaration {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user