Reduce with a second param instead of default val
This commit is contained in:
parent
85154ad4c8
commit
b298b74521
|
@ -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
|
||||
})
|
||||
}, {})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue