mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-29 11:03:13 +00:00
[web] Fixes stopEdit action in ducks/ui/flow.js
This commit is contained in:
parent
39154e628e
commit
c4e0ea27a1
@ -60,7 +60,7 @@ export default function reducer(state = defaultState, action) {
|
|||||||
// There is no explicit "stop edit" event.
|
// There is no explicit "stop edit" event.
|
||||||
// We stop editing when we receive an update for
|
// We stop editing when we receive an update for
|
||||||
// the currently edited flow from the server
|
// the currently edited flow from the server
|
||||||
if (action.data.id === state.modifiedFlow.id) {
|
if (action.flow.id === state.modifiedFlow.id) {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
modifiedFlow: false,
|
modifiedFlow: false,
|
||||||
@ -149,5 +149,6 @@ export function setContent(content){
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function stopEdit(flow, modifiedFlow) {
|
export function stopEdit(flow, modifiedFlow) {
|
||||||
return flowsActions.update(flow, getDiff(flow, modifiedFlow))
|
let diff = getDiff(flow, modifiedFlow)
|
||||||
|
return {type: flowsActions.UPDATE, flow, diff }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user