aboutsummaryrefslogtreecommitdiffstats
path: root/web/src
diff options
context:
space:
mode:
authorJason <jason.daurus@gmail.com>2016-05-24 23:16:30 +0800
committerJason <jason.daurus@gmail.com>2016-05-24 23:16:30 +0800
commit6bf74955b9026fb840163aae44c429a3a746464b (patch)
treeaa14766857403f032af00eb6a8e12d753dbcea24 /web/src
parent61453aa8479498c83f439d83fff60e9a9b17ab01 (diff)
downloadmitmproxy-6bf74955b9026fb840163aae44c429a3a746464b.tar.gz
mitmproxy-6bf74955b9026fb840163aae44c429a3a746464b.tar.bz2
mitmproxy-6bf74955b9026fb840163aae44c429a3a746464b.zip
[web] use props.location instead of context.location
Diffstat (limited to 'web/src')
-rw-r--r--web/src/js/components/proxyapp.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/web/src/js/components/proxyapp.js b/web/src/js/components/proxyapp.js
index 82234996..f47c5bb4 100644
--- a/web/src/js/components/proxyapp.js
+++ b/web/src/js/components/proxyapp.js
@@ -28,14 +28,13 @@ var ProxyAppMain = React.createClass({
location: React.PropTypes.object.isRequired,
},
contextTypes: {
- location: React.PropTypes.object,
router: React.PropTypes.object.isRequired
},
updateLocation: function (pathname, queryUpdate) {
if (pathname === undefined) {
- pathname = this.context.location.pathname;
+ pathname = this.props.location.pathname;
}
- var query = this.context.location.query;
+ var query = this.props.location.query;
if (queryUpdate !== undefined) {
for (var i in queryUpdate) {
if (queryUpdate.hasOwnProperty(i)) {
@@ -48,7 +47,7 @@ var ProxyAppMain = React.createClass({
getQuery: function () {
// For whatever reason, react-router always returns the same object, which makes comparing
// the current props with nextProps impossible. As a workaround, we just clone the query object.
- return _.clone(this.context.location.query);
+ return _.clone(this.props.location.query);
},
componentDidMount: function () {
this.focus();