summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar_right/sidebar_right.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/sidebar_right/sidebar_right.jsx')
-rw-r--r--webapp/components/sidebar_right/sidebar_right.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/sidebar_right/sidebar_right.jsx b/webapp/components/sidebar_right/sidebar_right.jsx
index 21d3df345..737254682 100644
--- a/webapp/components/sidebar_right/sidebar_right.jsx
+++ b/webapp/components/sidebar_right/sidebar_right.jsx
@@ -77,12 +77,12 @@ export default class SidebarRight extends React.Component {
}
shouldComponentUpdate(nextProps, nextState) {
- return !Utils.areObjectsEqual(nextState, this.state) || !Utils.areObjectsEqual(nextProps, this.props);
+ return !Utils.areObjectsEqual(nextState, this.state) || this.props.postRightVisible !== nextProps.postRightVisible;
}
componentWillUpdate(nextProps, nextState) {
const isOpen = this.state.searchVisible || this.props.postRightVisible;
- const willOpen = nextState.searchVisible || nextState.postRightVisible;
+ const willOpen = nextState.searchVisible || nextProps.postRightVisible;
if (!isOpen && willOpen) {
trackEvent('ui', 'ui_rhs_opened');