Fix crash in glitch-soc search results when Elasticsearch is disabled (#1780)
This commit is contained in:
parent
9477502330
commit
b1085e2dfa
1 changed files with 3 additions and 3 deletions
|
@ -48,6 +48,9 @@ class SearchResults extends ImmutablePureComponent {
|
||||||
render () {
|
render () {
|
||||||
const { intl, results, suggestions, dismissSuggestion, searchTerm } = this.props;
|
const { intl, results, suggestions, dismissSuggestion, searchTerm } = this.props;
|
||||||
|
|
||||||
|
let accounts, statuses, hashtags;
|
||||||
|
let count = 0;
|
||||||
|
|
||||||
if (searchTerm === '' && !suggestions.isEmpty()) {
|
if (searchTerm === '' && !suggestions.isEmpty()) {
|
||||||
return (
|
return (
|
||||||
<div className='drawer--results'>
|
<div className='drawer--results'>
|
||||||
|
@ -81,9 +84,6 @@ class SearchResults extends ImmutablePureComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let accounts, statuses, hashtags;
|
|
||||||
let count = 0;
|
|
||||||
|
|
||||||
if (results.get('accounts') && results.get('accounts').size > 0) {
|
if (results.get('accounts') && results.get('accounts').size > 0) {
|
||||||
count += results.get('accounts').size;
|
count += results.get('accounts').size;
|
||||||
accounts = (
|
accounts = (
|
||||||
|
|
Loading…
Reference in a new issue