diff options
author | przemyslawpluta <przemekpluta@hotmail.com> | 2014-09-30 00:01:06 +0100 |
---|---|---|
committer | przemyslawpluta <przemekpluta@hotmail.com> | 2014-09-30 00:01:06 +0100 |
commit | 4179bf6bdac360a78368c5d3264b27426e41a42d (patch) | |
tree | cb44d1bc7dd7f7e70b1939df1e30c5ab34ac409c /lib | |
parent | 4ed25770687f068274959572e7fff05884c608bd (diff) | |
download | mongo-edu-4179bf6bdac360a78368c5d3264b27426e41a42d.zip |
cleanup
Diffstat (limited to 'lib')
-rw-r--r-- | lib/options.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/options.js b/lib/options.js index 6dd1f72..0e95a2d 100644 --- a/lib/options.js +++ b/lib/options.js @@ -138,7 +138,7 @@ function showPresets(argv, initRun, checkIfLoad) { if (err !== null) { return console.log('i'.red + ' No Presets Found.'); } var items = _.values(data), presets = _.keys(data), t = new Table, - count = 0, names = [], users = [], clear = [], info = false, user = '', i; + count = 0, names = [], users = [], clear = [], info = false, i; items.forEach(function each(item) { t.cell('Preset', presets[count]); @@ -168,9 +168,9 @@ function showPresets(argv, initRun, checkIfLoad) { clear = clear.map(function map(item) { return names[item]; }); - user = _.intersection(users); + users = _.intersection(users); - if ((items.length > 1) && user.length === 1) { + if ((items.length > 1) && users.length === 1) { clear = _.pull(clear, 'User'); info = true; } @@ -181,7 +181,7 @@ function showPresets(argv, initRun, checkIfLoad) { t.columns = _.pick(t.columns, clear); - if (info) { console.log('User: '.bold + user[0] + '\n'); } + if (info) { console.log('User: '.bold + users[0] + '\n'); } console.log(t.toString()); |