Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled TypeError on non-alphanumeric keys #4

Closed
vincemtnz opened this issue Nov 21, 2013 · 1 comment
Closed

Unhandled TypeError on non-alphanumeric keys #4

vincemtnz opened this issue Nov 21, 2013 · 1 comment

Comments

@vincemtnz
Copy link
Contributor

Non-alphanumeric keys, e.g. ,/?., cause a TypeError on keypress.

/home/eyko/github/node-term-list/index.js:57
  switch (key.name) {
             ^
TypeError: Cannot read property 'name' of undefined
    at List.onkeypress (/home/eyko/github/node-term-list/index.js:57:14)
    at ReadStream.EventEmitter.emit (events.js:98:17)
    at emitKey (/home/eyko/github/node-term-list/node_modules/keypress/index.js:406:12)
    at ReadStream.onData (/home/eyko/github/node-term-list/node_modules/keypress/index.js:48:14)
    at ReadStream.EventEmitter.emit (events.js:95:17)
    at ReadStream.<anonymous> (_stream_readable.js:746:14)
    at ReadStream.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    at emitReadable (_stream_readable.js:404:5)
    at readableAddChunk (_stream_readable.js:165:9)

@ledbettj reported it over here: guo-yu/btc#1 so stopping the event from being triggered would prevent the same error when requiring the lib.

@vincemtnz
Copy link
Contributor Author

Probably close this, just made a PR: #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant