From dcb42b3016415865848cdc2607ff640c1fd50818 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 27 Mar 2015 16:54:21 +0100 Subject: web: fix react-router --- libmproxy/web/static/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libmproxy/web') diff --git a/libmproxy/web/static/app.js b/libmproxy/web/static/app.js index 044b9e35..24f4948e 100644 --- a/libmproxy/web/static/app.js +++ b/libmproxy/web/static/app.js @@ -528,10 +528,12 @@ var Navigation = _.extend({}, ReactRouter.Navigation, { // we may remove this mixin and access react-router directly again. var State = _.extend({}, ReactRouter.State, { getQuery: function(){ - return this.context.router.getCurrentQuery(); + // 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.router.getCurrentQuery()); }, getParams: function(){ - return this.context.router.getCurrentParams(); + return _.clone(this.context.router.getCurrentParams()); } }); -- cgit v1.2.3