commands: return early when calling commands in JS

Found with clang's static analyzer.
commands; use a default action for the menu