mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-27 03:35:50 +03:00
Fix followers list failing if familiar followers fail
This commit is contained in:
parent
4e5940900e
commit
5c9f6bae3c
1 changed files with 6 additions and 5 deletions
|
@ -254,12 +254,13 @@ function AccountInfo({
|
||||||
// On first load, fetch familiar followers, merge to top of results' `value`
|
// On first load, fetch familiar followers, merge to top of results' `value`
|
||||||
// Remove dups on every fetch
|
// Remove dups on every fetch
|
||||||
if (firstLoad) {
|
if (firstLoad) {
|
||||||
const familiarFollowers = await masto.v1.accounts.familiarFollowers.fetch(
|
let familiarFollowers = [];
|
||||||
{
|
try {
|
||||||
|
familiarFollowers = await masto.v1.accounts.familiarFollowers.fetch({
|
||||||
id: [id],
|
id: [id],
|
||||||
},
|
});
|
||||||
);
|
} catch (e) {}
|
||||||
familiarFollowersCache.current = familiarFollowers[0].accounts;
|
familiarFollowersCache.current = familiarFollowers?.[0]?.accounts || [];
|
||||||
newValue = [
|
newValue = [
|
||||||
...familiarFollowersCache.current,
|
...familiarFollowersCache.current,
|
||||||
...value.filter(
|
...value.filter(
|
||||||
|
|
Loading…
Reference in a new issue