rizowski / eslint-watch

ESLint with simple watching capabilities
https://www.npmjs.com/package/eslint-watch
MIT License
196 stars 29 forks source link

Check if key is defined when logging #121

Closed alasdairtran closed 7 years ago

alasdairtran commented 7 years ago

What was the problem/Ticket Number

This is a continuation of #116. I forgot to take one more case into account. The tool still crashes when pressing a number in watch mode. This is due to the logging line.

How does this solve the problem?

Make sure that key is defined before getting the name property from it during logging.

How to duplicate the issue

As before,

  1. Run the tool in watch mode
  2. Press a number key like 1.
  3. The tool will then crash.