From aa3033b4fff1be628a008abbd4dc5a9c54af9210 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 12 Sep 2023 19:20:22 +0800 Subject: [PATCH] Fix bugs with fetching followers/followings --- src/components/account-info.jsx | 2 +- src/components/generic-accounts.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx index 2cb56ff8..008aba6b 100644 --- a/src/components/account-info.jsx +++ b/src/components/account-info.jsx @@ -144,7 +144,7 @@ function AccountInfo({ ), ), ]; - } else { + } else if (value?.length) { newValue = value.filter( (account) => !familiarFollowersCache.current.some( diff --git a/src/components/generic-accounts.jsx b/src/components/generic-accounts.jsx index dd1dae75..48e49f29 100644 --- a/src/components/generic-accounts.jsx +++ b/src/components/generic-accounts.jsx @@ -29,7 +29,7 @@ export default function GenericAccounts({ onClose = () => {} }) { const loadAccounts = (firstLoad) => { if (!fetchAccounts) return; - setAccounts([]); + if (firstLoad) setAccounts([]); setUIState('loading'); (async () => { try {