aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Brunner <cle1000.cb@gmail.com>2016-07-12 23:52:33 +0200
committerMaximilian Hils <git@maximilianhils.com>2016-07-12 14:52:33 -0700
commit2624911d75670afaff8631943d567bfa2b42d7b8 (patch)
tree2d134adae3d561e2084deaee17c81a64e44cbaf4
parent3579c6dd43529595ce1a37d96f19a446419c6ee5 (diff)
downloadmitmproxy-2624911d75670afaff8631943d567bfa2b42d7b8.tar.gz
mitmproxy-2624911d75670afaff8631943d567bfa2b42d7b8.tar.bz2
mitmproxy-2624911d75670afaff8631943d567bfa2b42d7b8.zip
fixed bug (#1342)
fix minor mitmweb issues
-rw-r--r--web/src/js/components/Header/FlowMenu.jsx4
-rw-r--r--web/src/js/ducks/ui.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/web/src/js/components/Header/FlowMenu.jsx b/web/src/js/components/Header/FlowMenu.jsx
index 8d13dd6a..9855cde3 100644
--- a/web/src/js/components/Header/FlowMenu.jsx
+++ b/web/src/js/components/Header/FlowMenu.jsx
@@ -15,11 +15,11 @@ function FlowMenu({ flow, acceptFlow, replayFlow, duplicateFlow, removeFlow, rev
return (
<div>
<div className="menu-row">
- <Button disabled={!flow.intercepted} title="[a]ccept intercepted flow" text="Accept" icon="fa-play" onClick={() => acceptFlow(flow)} />
+ <Button disabled={!flow || !flow.intercepted} title="[a]ccept intercepted flow" text="Accept" icon="fa-play" onClick={() => acceptFlow(flow)} />
<Button title="[r]eplay flow" text="Replay" icon="fa-repeat" onClick={() => replayFlow(flow)} />
<Button title="[D]uplicate flow" text="Duplicate" icon="fa-copy" onClick={() => duplicateFlow(flow)} />
<Button title="[d]elete flow" text="Delete" icon="fa-trash" onClick={() => removeFlow(flow)}/>
- <Button disabled={!flow.modified} title="revert changes to flow [V]" text="Revert" icon="fa-history" onClick={() => revertFlow(flow)} />
+ <Button disabled={!flow || !flow.modified} title="revert changes to flow [V]" text="Revert" icon="fa-history" onClick={() => revertFlow(flow)} />
<Button title="download" text="Download" icon="fa-download" onClick={() => window.location = MessageUtils.getContentURL(flow, flow.response)}/>
</div>
<div className="clearfix"/>
diff --git a/web/src/js/ducks/ui.js b/web/src/js/ducks/ui.js
index f8234fdb..4de460aa 100644
--- a/web/src/js/ducks/ui.js
+++ b/web/src/js/ducks/ui.js
@@ -13,8 +13,8 @@ export default function reducer(state = defaultState, action) {
activeMenu: action.activeMenu
}
case SELECT:
- let isNewSelect = (action.flowId && !action.currentSelection)
- let isDeselect = (!action.flowId && action.currentSelection)
+ let isNewSelect = (action.id && !action.currentSelection)
+ let isDeselect = (!action.id && action.currentSelection)
if(isNewSelect) {
return {
...state,