fugazi-io / webclient

web based terminal application for executing local and remote commands
http://fugazi.io
28 stars 12 forks source link

change error message for `list components` commands #101

Open nitzantomer opened 7 years ago

nitzantomer commented 7 years ago

right now the functions look like this:

return fugazi.components.registry.getModule(props.path).getCommands().map(componentToStruct);

but if fugazi.components.registry.getModule(props.path) returns undefined then the error message is:

Cannot read property 'getCommands' of undefined

instead first the commands need to check whether the module exists, if not return that as an error message and only if it does continue