Major bug fix

This commit is contained in:
Wessel T
2019-02-19 17:14:18 +01:00
parent da8634c9a5
commit f04f05e606
2 changed files with 3 additions and 3 deletions

View File

@@ -11,8 +11,8 @@ module.exports = (args) => {
const cApplicable = (v) => ( isNaN(v) ? (v.toString().toLowerCase() === 'true' ? true : (v.toString().toLowerCase() === 'false' ? false : v)) : Number(v));
for (let _ = 0; _ < args.length; _++) {
const e = args[i].indexOf('=');
const r = args[i].charAt(0) === '-' && args.length - 1 >= i + 1 && args[_ + 1].indexOf('=') === -1 && args[_ + 1].charAt(0) !== '-';
const e = args[_].indexOf('=');
const r = args[_].charAt(0) === '-' && args.length - 1 >= _ + 1 && args[_ + 1].indexOf('=') === -1 && args[_ + 1].charAt(0) !== '-';
const n = e === -1 ? rHyphens(args[_]) : rHyphens(args[_].slice(0, e));
if ( e !== -1 ) p[ n ] = cApplicable( args[ i ].slice(e + 1));