aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/input.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/reducers/input.js')
-rw-r--r--src/content/reducers/input.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/content/reducers/input.js b/src/content/reducers/input.js
index 134aa95..23e7dd2 100644
--- a/src/content/reducers/input.js
+++ b/src/content/reducers/input.js
@@ -7,13 +7,11 @@ const defaultState = {
export default function reducer(state = defaultState, action = {}) {
switch (action.type) {
case actions.INPUT_KEY_PRESS:
- return Object.assign({}, state, {
- keys: state.keys.concat([action.key]),
- });
+ return { ...state,
+ keys: state.keys.concat([action.key]), };
case actions.INPUT_CLEAR_KEYS:
- return Object.assign({}, state, {
- keys: [],
- });
+ return { ...state,
+ keys: [], };
default:
return state;
}