aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/reducers')
-rw-r--r--src/content/reducers/input.js6
-rw-r--r--src/content/reducers/setting.js2
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 = {}) {