diff options
author | Matthew Shao <me@matshao.com> | 2017-07-27 11:22:02 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-07-27 11:22:02 +0800 |
commit | 7e5f424c5013a591e71f570b003e34f8e6788869 (patch) | |
tree | ec3b19c13af67ccb41b4e272297c08f172df53a8 /web/src/js/components | |
parent | 4ab5574e1849ffe85bd9d06d0beb7a40b31a3845 (diff) | |
download | mitmproxy-7e5f424c5013a591e71f570b003e34f8e6788869.tar.gz mitmproxy-7e5f424c5013a591e71f570b003e34f8e6788869.tar.bz2 mitmproxy-7e5f424c5013a591e71f570b003e34f8e6788869.zip |
[web] Minor fix for frontend and tests.
Diffstat (limited to 'web/src/js/components')
-rw-r--r-- | web/src/js/components/Modal/OptionModal.jsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/web/src/js/components/Modal/OptionModal.jsx b/web/src/js/components/Modal/OptionModal.jsx index bc25214a..82ef8350 100644 --- a/web/src/js/components/Modal/OptionModal.jsx +++ b/web/src/js/components/Modal/OptionModal.jsx @@ -52,15 +52,18 @@ class PureOptionModal extends Component { this.state = { title: 'Options' } } + componentWillUnmount(){ + this.props.save() + } + render() { - const { hideModal, options, dump } = this.props + const { hideModal, options } = this.props const { title } = this.state return ( <div> <div className="modal-header"> <button type="button" className="close" data-dismiss="modal" onClick={() => { hideModal() - dump() }}> <i className="fa fa-fw fa-times"></i> </button> @@ -102,6 +105,6 @@ export default connect( }), { hideModal: modalAction.hideModal, - dump: optionAction.dump, + save: optionAction.save, } )(PureOptionModal) |