diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-10 21:34:40 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-10 21:34:40 +0900 |
commit | 22c34a0a6f9721fb9d907ab10de91cbbc40d6bbe (patch) | |
tree | 5a09df3bef405e526d961adff5e40e9db983a234 /src/background/reducers | |
parent | 6083e70ea089fa2683741a1118be0e4e6b76f858 (diff) |
add set property action in background
Diffstat (limited to 'src/background/reducers')
-rw-r--r-- | src/background/reducers/setting.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/background/reducers/setting.js b/src/background/reducers/setting.js index 70bf8ea..045a654 100644 --- a/src/background/reducers/setting.js +++ b/src/background/reducers/setting.js @@ -1,4 +1,4 @@ -import actions from 'settings/actions'; +import actions from 'background/actions'; const defaultState = { value: {}, @@ -10,6 +10,13 @@ export default function reducer(state = defaultState, action = {}) { return { value: action.value, }; + case actions.SETTING_SET_PROPERTY: + return { + value: Object.assign({}, state.value, { + properties: Object.assign({}, state.value.properties, + { [action.name]: action.value }) + }) + }; default: return state; } |