diff --git a/ReactNativeClient/lib/services/CommandService.ts b/ReactNativeClient/lib/services/CommandService.ts index c2b7c1287..e4c200b02 100644 --- a/ReactNativeClient/lib/services/CommandService.ts +++ b/ReactNativeClient/lib/services/CommandService.ts @@ -25,7 +25,6 @@ export interface CommandRuntime { // Used for the (optional) toolbar button title title?(props:any):string, - // props?:any } export interface CommandDeclaration { diff --git a/ReactNativeClient/lib/services/commands/MenuUtils.ts b/ReactNativeClient/lib/services/commands/MenuUtils.ts index a1153fd9a..1c9872a9c 100644 --- a/ReactNativeClient/lib/services/commands/MenuUtils.ts +++ b/ReactNativeClient/lib/services/commands/MenuUtils.ts @@ -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 {