about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/components
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-05-24 16:10:18 +0200
committerGitHub <noreply@github.com>2022-05-24 16:10:18 +0200
commit4ab3ad3bef44d245a7c02d05c7cc1788f17b2dd0 (patch)
tree693b3ac75bce9a194337413a2d60d2430a577c43 /app/javascript/flavours/glitch/features/compose/components
parent1beb8db4e26d1bd4a801b432f466d948b3b562fc (diff)
Fix crash in glitch-soc search results when Elasticsearch is disabled (#1780)
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components')
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/search_results.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/search_results.js b/app/javascript/flavours/glitch/features/compose/components/search_results.js
index d92a6bf6b..e82ee2ca2 100644
--- a/app/javascript/flavours/glitch/features/compose/components/search_results.js
+++ b/app/javascript/flavours/glitch/features/compose/components/search_results.js
@@ -48,6 +48,9 @@ class SearchResults extends ImmutablePureComponent {
   render () {
     const { intl, results, suggestions, dismissSuggestion, searchTerm } = this.props;
 
+    let accounts, statuses, hashtags;
+    let count = 0;
+
     if (searchTerm === '' && !suggestions.isEmpty()) {
       return (
         <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) {
       count   += results.get('accounts').size;
       accounts = (