You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
crashes on keypress for certain non-alphanumeric keys, for example .,?.
/usr/lib/node_modules/btc/libs/cli.js:125
if (key.name == 'return') {
^
TypeError: Cannot read property 'name' of undefined
at List.module.exports (/usr/lib/node_modules/btc/libs/cli.js:125:16)
at List.EventEmitter.emit (events.js:99:17)
at List.onkeypress (/usr/lib/node_modules/btc/node_modules/term-list/index.js:54:8)
at ReadStream.EventEmitter.emit (events.js:126:20)
at emitKey (/usr/lib/node_modules/btc/node_modules/term-list/node_modules/keypress/index.js:406:12)
at ReadStream.onData (/usr/lib/node_modules/btc/node_modules/term-list/node_modules/keypress/index.js:48:14)
at ReadStream.EventEmitter.emit (events.js:126:20)
at TTY.onread (net.js:397:14)
Edit:
based on the keypress examples it looks like it's expected to check that key is truthy prior to checking any properties. (if (key && key.name == 'return') { ... })
The text was updated successfully, but these errors were encountered:
This is a bug in node-term-list. Fixing it here will still cause btc to crash, since there's a switch in the default onkeypress behaviour in node-term-list. I've reported a bug over there: tj/node-term-list#4 and submitted a pull request, which should fix the problem (once the dependency has been updated).
crashes on keypress for certain non-alphanumeric keys, for example
.,?
.Edit:
based on the keypress examples it looks like it's expected to check that
key
is truthy prior to checking any properties. (if (key && key.name == 'return') { ... }
)The text was updated successfully, but these errors were encountered: