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 | |
parent | 3af2e3154ed6b56400d02fc3d726bfc7186f372a (diff) | |
parent | ccf3c7b421e804172827dd34a995290afc85af10 (diff) |
Merge pull request #132 from ueokande/meta-keys
Meta keys
Diffstat (limited to 'src/content/reducers')
-rw-r--r-- | src/content/reducers/input.js | 6 | ||||
-rw-r--r-- | src/content/reducers/setting.js | 2 |
2 files changed, 4 insertions, 4 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; diff --git a/src/content/reducers/setting.js b/src/content/reducers/setting.js index b6f6c58..a54f5a3 100644 --- a/src/content/reducers/setting.js +++ b/src/content/reducers/setting.js @@ -1,7 +1,7 @@ import actions from 'content/actions'; const defaultState = { - keymaps: {}, + keymaps: new Map(), }; export default function reducer(state = defaultState, action = {}) { |