about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-30 12:06:21 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-07-30 12:06:21 +0200
commit78144f4c7923d502cc86b322f044e740e4a8fa8a (patch)
treeb46bfe819bcc2f66a5d5cb47567299f74fa70fb6 /app/javascript
parent24552b5160a5090e7d6056fb69a209aa48fe4fce (diff)
Fix crash when expanding search results for hashtags (#11447)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/reducers/search.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js
index f437ff217..875b2d92b 100644
--- a/app/javascript/mastodon/reducers/search.js
+++ b/app/javascript/mastodon/reducers/search.js
@@ -44,7 +44,8 @@ export default function search(state = initialState, action) {
       hashtags: fromJS(action.results.hashtags),
     })).set('submitted', true).set('searchTerm', action.searchTerm);
   case SEARCH_EXPAND_SUCCESS:
-    return state.updateIn(['results', action.searchType], list => list.concat(action.results[action.searchType].map(item => item.id)));
+    const results = action.searchType === 'hashtags' ? fromJS(action.results.hashtags) : action.results[action.searchType].map(item => item.id);
+    return state.updateIn(['results', action.searchType], list => list.concat(results));
   default:
     return state;
   }