diff options
Diffstat (limited to 'src/content/reducers/addon.js')
-rw-r--r-- | src/content/reducers/addon.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/content/reducers/addon.js b/src/content/reducers/addon.js index 8cc5ef1..b881ca0 100644 --- a/src/content/reducers/addon.js +++ b/src/content/reducers/addon.js @@ -7,17 +7,14 @@ const defaultState = { export default function reducer(state = defaultState, action = {}) { switch (action.type) { case actions.ADDON_ENABLE: - return Object.assign({}, state, { - enabled: true, - }); + return { ...state, + enabled: true, }; case actions.ADDON_DISABLE: - return Object.assign({}, state, { - enabled: false, - }); + return { ...state, + enabled: false, }; case actions.ADDON_TOGGLE_ENABLED: - return Object.assign({}, state, { - enabled: !state.enabled, - }); + return { ...state, + enabled: !state.enabled, }; default: return state; } |