diff --git a/lib/readline.js b/lib/readline.js index 2cdd2cf392c71f..35fab29965ee4e 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -861,15 +861,15 @@ Interface.prototype._ttyWrite = function(s, key) { this._historyNext(); break; - default: - if (key.name === 'tab') { - // If tab completion enabled, do that... - if (typeof this.completer === 'function') { - this._tabComplete(); - break; - } + case 'tab': + // If tab completion enabled, do that... + if (typeof this.completer === 'function') { + this._tabComplete(); + break; } + // falls through + default: if (s instanceof Buffer) s = s.toString('utf-8');