mokkabonna / inquirer-autocomplete-prompt

Autocomplete prompt for inquirer
ISC License
354 stars 82 forks source link

Fixes a crash in suggestOnly mode #37

Closed sullof closed 7 years ago

sullof commented 7 years ago

In suggestOnly mode, if the user types the beginning of a command that is not in the list and press tab there is a fatal error and the app crashes.

To replicate the error, run the example and when it shows the first list type, for example, 'foo' and press tab.

This PS fixes the error checking if that command is part of the list, before trying to retrieve its value.

mokkabonna commented 7 years ago

Thanks!