aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/follow-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/reducers/follow-controller.js')
-rw-r--r--src/content/reducers/follow-controller.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/content/reducers/follow-controller.js b/src/content/reducers/follow-controller.js
index 78fd848..5869c47 100644
--- a/src/content/reducers/follow-controller.js
+++ b/src/content/reducers/follow-controller.js
@@ -10,24 +10,20 @@ const defaultState = {
export default function reducer(state = defaultState, action = {}) {
switch (action.type) {
case actions.FOLLOW_CONTROLLER_ENABLE:
- return Object.assign({}, state, {
+ return { ...state,
enabled: true,
newTab: action.newTab,
background: action.background,
- keys: '',
- });
+ keys: '', };
case actions.FOLLOW_CONTROLLER_DISABLE:
- return Object.assign({}, state, {
- enabled: false,
- });
+ return { ...state,
+ enabled: false, };
case actions.FOLLOW_CONTROLLER_KEY_PRESS:
- return Object.assign({}, state, {
- keys: state.keys + action.key,
- });
+ return { ...state,
+ keys: state.keys + action.key, };
case actions.FOLLOW_CONTROLLER_BACKSPACE:
- return Object.assign({}, state, {
- keys: state.keys.slice(0, -1),
- });
+ return { ...state,
+ keys: state.keys.slice(0, -1), };
default:
return state;
}