From b298b74521f71caae9854bc55d68797816103e0f Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sun, 5 Nov 2017 14:14:00 +0100 Subject: [PATCH] Reduce with a second param instead of default val --- frontend/src/pages/command.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/command.js b/frontend/src/pages/command.js index 9431216..4c991af 100644 --- a/frontend/src/pages/command.js +++ b/frontend/src/pages/command.js @@ -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 - }) + }, {}) } }