1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-12 21:59:04 +09:00

[Glitch] Fix crash when search fails in web UI

Port 8751c3c495 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko 2022-03-22 18:20:25 +01:00 committed by Claire
parent de9700a71a
commit 9b17b26df4

View 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} /> <Account key={`account-${item}`} id={item} />
)), onLoadMore); )), 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} /> <Hashtag key={`tag-${item.get('name')}`} hashtag={item} />
)), onLoadMore); )), 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} /> <Status key={`status-${item}`} id={item} />
)), onLoadMore); )), onLoadMore);