Only update analytics when there's a change
Also, the arguments are the previous state, not the new state.
This commit is contained in:
parent
e2edae3383
commit
1c41c3dd63
1 changed files with 4 additions and 2 deletions
|
@ -86,8 +86,10 @@ const LeftPanel = React.createClass({
|
|||
return false;
|
||||
},
|
||||
|
||||
componentDidUpdate(newProps, newState) {
|
||||
Analytics.setBreadcrumbs(newState.breadcrumbs);
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
if (prevState.breadcrumbs !== this.state.breadcrumbs) {
|
||||
Analytics.setBreadcrumbs(this.state.breadcrumbs);
|
||||
}
|
||||
},
|
||||
|
||||
_onBreadcrumbsChanged: function(settingName, roomId, level, valueAtLevel, value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue