StatusList: don't push null item to Virtuoso (LoadGap)

This commit is contained in:
Alex Gleason 2023-02-14 10:44:00 -06:00
parent 261d900b51
commit 41b4a229b6
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -192,7 +192,11 @@ const StatusList: React.FC<IStatusList> = ({
}
if (statusId === null) {
acc.push(renderLoadGap(index));
const gap = renderLoadGap(index);
// one does not simply push a null item to Virtuoso: https://github.com/petyosi/react-virtuoso/issues/206#issuecomment-747363793
if (gap) {
acc.push(gap);
}
} else if (statusId.startsWith('末suggestions-')) {
if (soapboxConfig.feedInjection) {
acc.push(renderFeedSuggestions());