summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-11-12 10:12:34 -0800
committerCorey Hulen <corey@hulen.com>2015-11-12 10:12:34 -0800
commitb6049721f9a168b47b5b6b602517719277b56b07 (patch)
treec3b306daf84f8a159f0819fa66a27deb4902a1d8 /web/react/components/sidebar.jsx
parent6f7b7169b2333a8f9e3dca41bb23eefc9935731b (diff)
parent50815f9be7195d736debd6bcd9d300dd95bbc738 (diff)
downloadchat-b6049721f9a168b47b5b6b602517719277b56b07.tar.gz
chat-b6049721f9a168b47b5b6b602517719277b56b07.tar.bz2
chat-b6049721f9a168b47b5b6b602517719277b56b07.zip
Merge pull request #1409 from mattermost/plt-961
PLT-961 Rename areStatesEqual to areObjectsEqual and make it more comprehensive and accurate.
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index e3ee9f14b..b02ec0692 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -175,7 +175,7 @@ export default class Sidebar extends React.Component {
window.addEventListener('resize', this.handleResize);
}
shouldComponentUpdate(nextProps, nextState) {
- if (!Utils.areStatesEqual(nextState, this.state)) {
+ if (!Utils.areObjectsEqual(nextState, this.state)) {
return true;
}
return false;
@@ -207,10 +207,7 @@ export default class Sidebar extends React.Component {
}
}
onChange() {
- var newState = this.getStateFromStores();
- if (!Utils.areStatesEqual(newState, this.state)) {
- this.setState(newState);
- }
+ this.setState(this.getStateFromStores());
}
updateTitle() {
const channel = ChannelStore.getCurrent();