aboutsummaryrefslogtreecommitdiff
path: root/src/background/reducers
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-06-28 21:41:34 +0900
committerGitHub <noreply@github.com>2018-06-28 21:41:34 +0900
commitd0c23587f8ee8c1bca38f036ae8f71078d6ca937 (patch)
tree2c5cb4aea22de3de6360220a6291440c7ac18230 /src/background/reducers
parent6d0732eb80f2a2b2546e659662537bf4e40d7e5c (diff)
parent05faaced137eb3a48780806fded04fd76bd9a84e (diff)
Merge pull request #423 from ueokande/greenkeeper/eslint-5.0.1
Update eslint
Diffstat (limited to 'src/background/reducers')
-rw-r--r--src/background/reducers/find.js5
-rw-r--r--src/background/reducers/index.js5
-rw-r--r--src/background/reducers/setting.js6
3 files changed, 6 insertions, 10 deletions
diff --git a/src/background/reducers/find.js b/src/background/reducers/find.js
index 4ded801..bbc6b36 100644
--- a/src/background/reducers/find.js
+++ b/src/background/reducers/find.js
@@ -7,9 +7,8 @@ const defaultState = {
export default function reducer(state = defaultState, action = {}) {
switch (action.type) {
case actions.FIND_SET_KEYWORD:
- return Object.assign({}, state, {
- keyword: action.keyword,
- });
+ return { ...state,
+ keyword: action.keyword, };
default:
return state;
}
diff --git a/src/background/reducers/index.js b/src/background/reducers/index.js
index 5729f0a..78f855c 100644
--- a/src/background/reducers/index.js
+++ b/src/background/reducers/index.js
@@ -10,9 +10,8 @@ const defaultState = {
};
export default function reducer(state = defaultState, action = {}) {
- return Object.assign({}, state, {
+ return { ...state,
setting: settingReducer(state.setting, action),
find: findReducer(state.find, action),
- tab: tabReducer(state.tab, action),
- });
+ tab: tabReducer(state.tab, action), };
}
diff --git a/src/background/reducers/setting.js b/src/background/reducers/setting.js
index 045a654..8dbc1b4 100644
--- a/src/background/reducers/setting.js
+++ b/src/background/reducers/setting.js
@@ -12,10 +12,8 @@ export default function reducer(state = defaultState, action = {}) {
};
case actions.SETTING_SET_PROPERTY:
return {
- value: Object.assign({}, state.value, {
- properties: Object.assign({}, state.value.properties,
- { [action.name]: action.value })
- })
+ value: { ...state.value,
+ properties: { ...state.value.properties, [action.name]: action.value }}
};
default:
return state;