Fix crash when expanding search results for hashtags (#11447)
This commit is contained in:
		
							parent
							
								
									825dc3ca22
								
							
						
					
					
						commit
						e85805138a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue