diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/yargs/lib/completion.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/yargs/lib/completion.js')
-rw-r--r-- | node_modules/yargs/lib/completion.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js index 93a936cf6..5cd9a18a0 100644 --- a/node_modules/yargs/lib/completion.js +++ b/node_modules/yargs/lib/completion.js @@ -44,7 +44,12 @@ module.exports = function (yargs, usage, command) { var handlers = command.getCommandHandlers() for (var i = 0, ii = args.length; i < ii; ++i) { if (handlers[args[i]] && handlers[args[i]].builder) { - return handlers[args[i]].builder(yargs.reset()).argv + const builder = handlers[args[i]].builder + if (typeof builder === 'function') { + const y = yargs.reset() + builder(y) + return y.argv + } } } |