diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-06-28 21:41:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-28 21:41:34 +0900 |
commit | d0c23587f8ee8c1bca38f036ae8f71078d6ca937 (patch) | |
tree | 2c5cb4aea22de3de6360220a6291440c7ac18230 /src/content/reducers/follow-controller.js | |
parent | 6d0732eb80f2a2b2546e659662537bf4e40d7e5c (diff) | |
parent | 05faaced137eb3a48780806fded04fd76bd9a84e (diff) |
Merge pull request #423 from ueokande/greenkeeper/eslint-5.0.1
Update eslint
Diffstat (limited to 'src/content/reducers/follow-controller.js')
-rw-r--r-- | src/content/reducers/follow-controller.js | 20 |
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; } |