about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/hashtag_timeline/index.js
diff options
context:
space:
mode:
authorJames Kiesel <james.kiesel@gmail.com>2018-11-17 23:07:48 +1300
committerEugen Rochko <eugen@zeonfederated.com>2018-11-17 11:07:48 +0100
commit4fdefffb9906ffc3e5fde7af652674bebffd6e15 (patch)
treef5daec68e9d060e7e8b89ad523b438144f5dc5d2 /app/javascript/mastodon/features/hashtag_timeline/index.js
parent9311430ed7022e2e02fbd0b453adfc43356fdf9d (diff)
Deep compare tags for hashtag column reload (#9297)
* Deep compare tags for hashtag column reload

* Don't use global lodash
Diffstat (limited to 'app/javascript/mastodon/features/hashtag_timeline/index.js')
-rw-r--r--app/javascript/mastodon/features/hashtag_timeline/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.js b/app/javascript/mastodon/features/hashtag_timeline/index.js
index 86658cb66..d7722dcce 100644
--- a/app/javascript/mastodon/features/hashtag_timeline/index.js
+++ b/app/javascript/mastodon/features/hashtag_timeline/index.js
@@ -9,6 +9,7 @@ import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
 import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
 import { FormattedMessage } from 'react-intl';
 import { connectHashtagStream } from '../../actions/streaming';
+import { isEqual } from 'lodash';
 
 const mapStateToProps = (state, props) => ({
   hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
@@ -100,7 +101,7 @@ class HashtagTimeline extends React.PureComponent {
   componentWillReceiveProps (nextProps) {
     const { dispatch, params } = this.props;
     const { id, tags } = nextProps.params;
-    if (id !== params.id || tags !== params.tags) {
+    if (id !== params.id || !isEqual(tags, params.tags)) {
       this._unsubscribe();
       this._subscribe(dispatch, id, tags);
       this.props.dispatch(clearTimeline(`hashtag:${id}`));