]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix crash when search fails in web UI
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 22 Mar 2022 17:20:25 +0000 (18:20 +0100)
committeraescling <aescling+gitlab@cat.family>
Thu, 17 Nov 2022 05:28:25 +0000 (00:28 -0500)
Port 8751c3c4954799aec24cecc1cae68df27d19ceee to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
app/javascript/flavours/glitch/features/explore/results.js

index 15a850f84df355160035070dcc73f3ea408dae24..8eac63c2c5088c7739b4e1dd18fbee653dd1235e 100644 (file)
@@ -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);