Don't assume a command is found in "Find and select command" command bar action (#2019)
This commit is contained in:
@ -402,8 +402,8 @@ export const commandBarMachine = createMachine(
|
||||
'Initialize arguments to submit': assign({
|
||||
argumentsToSubmit: (c, e) => {
|
||||
const command =
|
||||
'command' in e.data ? e.data.command : c.selectedCommand!
|
||||
if (!command.args) return {}
|
||||
'command' in e.data ? e.data.command : c.selectedCommand
|
||||
if (!command?.args) return {}
|
||||
const args: { [x: string]: unknown } = {}
|
||||
for (const [argName, arg] of Object.entries(command.args)) {
|
||||
args[argName] =
|
||||
|
Reference in New Issue
Block a user