1
0
Fork 0

Reduce with a second param instead of default val

This commit is contained in:
Gregory Eremin 2017-11-05 14:14:00 +01:00
parent 85154ad4c8
commit b298b74521
1 changed files with 2 additions and 2 deletions

View File

@ -30,10 +30,10 @@ export default class Command extends Component {
return {
command: cmd.name,
args: "",
flags: cmd.flags.reduce((list = {}, flag) => {
flags: cmd.flags.reduce((list, flag) => {
list[flag.name] = flag.default
return list
})
}, {})
}
}