diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-07-19 23:35:42 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-19 23:35:42 +1200 |
commit | 6000136b01fe16fc2747c739db878b51e0313006 (patch) | |
tree | ec794b33494e1ffd9b8f1c00d3ca275f8fd411d1 /web/src/js/ducks/utils/list.js | |
parent | 09fbebf42a88115ac98ad9bc86947fd1b6771a5d (diff) | |
parent | 18dd84b9081fb5552d5b5b2560405496445e2110 (diff) | |
download | mitmproxy-6000136b01fe16fc2747c739db878b51e0313006.tar.gz mitmproxy-6000136b01fe16fc2747c739db878b51e0313006.tar.bz2 mitmproxy-6000136b01fe16fc2747c739db878b51e0313006.zip |
Merge branch 'master' into cleanup
Diffstat (limited to 'web/src/js/ducks/utils/list.js')
-rw-r--r-- | web/src/js/ducks/utils/list.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/src/js/ducks/utils/list.js b/web/src/js/ducks/utils/list.js index 4f631590..fdeb5856 100644 --- a/web/src/js/ducks/utils/list.js +++ b/web/src/js/ducks/utils/list.js @@ -23,7 +23,7 @@ export default function reduce(state = defaultState, action) { } case UPDATE: { - const index = state.indexOf[action.id] + const index = state.indexOf[action.item.id] if (index == null) { return state @@ -36,7 +36,7 @@ export default function reduce(state = defaultState, action) { return { ...state, data, - byId: { ...state.byId, [action.id]: action.item } + byId: { ...state.byId, [action.item.id]: action.item } } } @@ -86,8 +86,8 @@ export function add(item) { /** * @public */ -export function update(id, item) { - return { type: UPDATE, id, item } +export function update(item) { + return { type: UPDATE, item } } /** |