From e85805138ad7e50c7a2f6fe2c826dd0237b6710f Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 30 Jul 2019 12:06:21 +0200 Subject: [PATCH] Fix crash when expanding search results for hashtags (#11447) --- app/javascript/mastodon/reducers/search.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js index f437ff2171..875b2d92b3 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; }