diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-12 18:25:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 18:25:14 +0900 |
commit | c7b05482f33cc778e1966faa9354ea46b490a115 (patch) | |
tree | b73bc6e5a6468d8c5a1118dcfb61f9d00b1aa5cf /src/content/reducers/input.js | |
parent | 3af2e3154ed6b56400d02fc3d726bfc7186f372a (diff) | |
parent | ccf3c7b421e804172827dd34a995290afc85af10 (diff) |
Merge pull request #132 from ueokande/meta-keys
Meta keys
Diffstat (limited to 'src/content/reducers/input.js')
-rw-r--r-- | src/content/reducers/input.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/reducers/input.js b/src/content/reducers/input.js index 9457604..134aa95 100644 --- a/src/content/reducers/input.js +++ b/src/content/reducers/input.js @@ -1,18 +1,18 @@ import actions from 'content/actions'; const defaultState = { - keys: '' + keys: [] }; export default function reducer(state = defaultState, action = {}) { switch (action.type) { case actions.INPUT_KEY_PRESS: return Object.assign({}, state, { - keys: state.keys + action.key + keys: state.keys.concat([action.key]), }); case actions.INPUT_CLEAR_KEYS: return Object.assign({}, state, { - keys: '', + keys: [], }); default: return state; |