Command.update isn't executed via buttons

Hello.
I’ve encountered a problem, and it might be a bug in v2.
It worked in the previous version.

I can’t define or update commands via buttons.

Example:

${ widgets.button("➕", function()
command.define{
name='foo',
run=function() foo() end,
key='+'
}
end) }

command.update isn’t executed either.

command.update {
name = "foo",
key = nil
}

It works perfectly in space-lua, but not via the button.

The command functions just set the command parameter the config, you would have to reload after setting that using editor.reloadConfigAndCommands().

After much trying, it worked using
editor.rebuildEditorState()
after command.update