diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-03-09 18:53:05 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-03-09 18:53:05 +0100 |
commit | 454cca43f034c59e576df151fa1ba3489b0b37af (patch) | |
tree | 79a56d8b78529879924df840cd79f7982abf384f /web/src/js | |
parent | aa2bf90b114f24ce01ca5d0e4f62cda819479e5d (diff) | |
parent | 84f180847d0e63dd6e12a82cebaf7fe4ffad040d (diff) | |
download | mitmproxy-454cca43f034c59e576df151fa1ba3489b0b37af.tar.gz mitmproxy-454cca43f034c59e576df151fa1ba3489b0b37af.tar.bz2 mitmproxy-454cca43f034c59e576df151fa1ba3489b0b37af.zip |
Merge pull request #1015 from gzzhanghao/props
[web] dont mutate props
Diffstat (limited to 'web/src/js')
-rw-r--r-- | web/src/js/components/eventlog.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/src/js/components/eventlog.js b/web/src/js/components/eventlog.js index 650f7cd3..51f1578e 100644 --- a/web/src/js/components/eventlog.js +++ b/web/src/js/components/eventlog.js @@ -58,8 +58,9 @@ var EventLogContents = React.createClass({ }, componentWillReceiveProps: function (nextProps) { if (nextProps.filter !== this.props.filter) { - this.props.filter = nextProps.filter; // Dirty: Make sure that view filter sees the update. - this.state.view.recalculate(); + this.state.view.recalculate(entry => + nextProps.filter[entry.level] + ); } }, getDefaultProps: function () { |