mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-29 11:03:13 +00:00
[web] Fixes the flaw in #2133
This commit is contained in:
parent
7d5ab70ce3
commit
8a734a2613
@ -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.flow.id === state.modifiedFlow.id) {
|
if (action.data.id === state.modifiedFlow.id) {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
modifiedFlow: false,
|
modifiedFlow: false,
|
||||||
@ -148,7 +148,7 @@ export function setContent(content){
|
|||||||
return { type: SET_CONTENT, content }
|
return { type: SET_CONTENT, content }
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stopEdit(flow, modifiedFlow) {
|
export function stopEdit(data, modifiedFlow) {
|
||||||
let diff = getDiff(flow, modifiedFlow)
|
let diff = getDiff(data, modifiedFlow)
|
||||||
return {type: flowsActions.UPDATE, flow, diff }
|
return {type: flowsActions.UPDATE, data, diff }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user