commandHandler does not check _ as command.

This commit is contained in:
anseki 2015-06-12 16:08:20 +09:00
parent 2aab17a10a
commit 948b690946
4 changed files with 2 additions and 2 deletions

View file

@ -1042,7 +1042,7 @@ function getClHandler(commandHandler, options) {
cmdKey = clHandler.args[0] || '';
if (!options.caseSensitive) { cmdKey = cmdKey.toLowerCase(); }
clHandler.hRes =
hIndex.hasOwnProperty(cmdKey) ?
cmdKey !== '_' && hIndex.hasOwnProperty(cmdKey) ?
hIndex[cmdKey].apply(res, clHandler.args.slice(1)) :
hIndex.hasOwnProperty('_') ? hIndex._.apply(res, clHandler.args) : null;
return {res: res, forceNext: false};

View file

@ -1,6 +1,6 @@
{
"name": "readline-sync",
"version": "1.2.18",
"version": "1.2.19",
"title": "readlineSync",
"description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).",
"keywords": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB