diff options
author | Matthew Shao <me@matshao.com> | 2017-03-11 17:43:55 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-03-11 17:43:55 +0800 |
commit | c4e0ea27a13649f282a889bd5c8f6f6b1b9a6f94 (patch) | |
tree | 00b926b8337e8b4574da587ac3a5650f214b3146 /web/src | |
parent | 39154e628e8db58db01b5d8f2fd4080736d79bb6 (diff) | |
download | mitmproxy-c4e0ea27a13649f282a889bd5c8f6f6b1b9a6f94.tar.gz mitmproxy-c4e0ea27a13649f282a889bd5c8f6f6b1b9a6f94.tar.bz2 mitmproxy-c4e0ea27a13649f282a889bd5c8f6f6b1b9a6f94.zip |
[web] Fixes stopEdit action in ducks/ui/flow.js
Diffstat (limited to 'web/src')
-rw-r--r-- | web/src/js/ducks/ui/flow.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/src/js/ducks/ui/flow.js b/web/src/js/ducks/ui/flow.js index fa7474d2..8cb6e170 100644 --- a/web/src/js/ducks/ui/flow.js +++ b/web/src/js/ducks/ui/flow.js @@ -60,7 +60,7 @@ export default function reducer(state = defaultState, action) { // There is no explicit "stop edit" event. // We stop editing when we receive an update for // the currently edited flow from the server - if (action.data.id === state.modifiedFlow.id) { + if (action.flow.id === state.modifiedFlow.id) { return { ...state, modifiedFlow: false, @@ -145,9 +145,10 @@ export function setShowFullContent() { } export function setContent(content){ - return { type: SET_CONTENT, content} + return { type: SET_CONTENT, content } } export function stopEdit(flow, modifiedFlow) { - return flowsActions.update(flow, getDiff(flow, modifiedFlow)) + let diff = getDiff(flow, modifiedFlow) + return {type: flowsActions.UPDATE, flow, diff } } |