about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/explore
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-03-22 18:20:25 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-10-08 20:49:02 +0200
commit9b17b26df41c08a0f282f9e6d9a41973cc06db68 (patch)
treea41d215d19e87697fdc153eaff4bb819f5e259f0 /app/javascript/flavours/glitch/features/explore
parentde9700a71a35ccfdc1c7e064f253127717579141 (diff)
[Glitch] Fix crash when search fails in web UI
Port 8751c3c4954799aec24cecc1cae68df27d19ceee to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/explore')
-rw-r--r--app/javascript/flavours/glitch/features/explore/results.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/explore/results.js b/app/javascript/flavours/glitch/features/explore/results.js
index 15a850f84..8eac63c2c 100644
--- a/app/javascript/flavours/glitch/features/explore/results.js
+++ b/app/javascript/flavours/glitch/features/explore/results.js
@@ -24,15 +24,15 @@ const appendLoadMore = (id, list, onLoadMore) => {
   }
 };
 
-const renderAccounts = (results, onLoadMore) => appendLoadMore('accounts', results.get('accounts').map(item => (
+const renderAccounts = (results, onLoadMore) => appendLoadMore('accounts', results.get('accounts', ImmutableList()).map(item => (
   <Account key={`account-${item}`} id={item} />
 )), onLoadMore);
 
-const renderHashtags = (results, onLoadMore) => appendLoadMore('hashtags', results.get('hashtags').map(item => (
+const renderHashtags = (results, onLoadMore) => appendLoadMore('hashtags', results.get('hashtags', ImmutableList()).map(item => (
   <Hashtag key={`tag-${item.get('name')}`} hashtag={item} />
 )), onLoadMore);
 
-const renderStatuses = (results, onLoadMore) => appendLoadMore('statuses', results.get('statuses').map(item => (
+const renderStatuses = (results, onLoadMore) => appendLoadMore('statuses', results.get('statuses', ImmutableList()).map(item => (
   <Status key={`status-${item}`} id={item} />
 )), onLoadMore);