From 2f514d100c76336fd66be1217ef225cbda3cbcf6 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Wed, 15 Feb 2023 18:39:00 -0800 Subject: [PATCH 1/2] Wait for libs init --- packages/common/src/services/audius-backend/AudiusBackend.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/common/src/services/audius-backend/AudiusBackend.ts b/packages/common/src/services/audius-backend/AudiusBackend.ts index ef55418aa5..fce4055e8e 100644 --- a/packages/common/src/services/audius-backend/AudiusBackend.ts +++ b/packages/common/src/services/audius-backend/AudiusBackend.ts @@ -1531,6 +1531,7 @@ export const audiusBackend = ({ async function getFolloweeFollows(userId: ID, limit = 100, offset = 0) { let followers = [] try { + await waitForLibsInit() followers = await audiusLibs.User.getMutualFollowers( limit, offset, From 8df7756edc7db1742b5155460c60e587ec5177ca Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Wed, 15 Feb 2023 18:39:14 -0800 Subject: [PATCH 2/2] Reselect when visible --- .../web/src/components/search-users-modal/SearchUsersModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/components/search-users-modal/SearchUsersModal.tsx b/packages/web/src/components/search-users-modal/SearchUsersModal.tsx index 6803245161..2bbd16d8d9 100644 --- a/packages/web/src/components/search-users-modal/SearchUsersModal.tsx +++ b/packages/web/src/components/search-users-modal/SearchUsersModal.tsx @@ -84,7 +84,7 @@ export const SearchUsersModal = (props: SearchUsersModalProps) => { const users = getUsers(state, { ids }) return ids.map((id) => users[id]) }, - [hasQuery, userIds] + [hasQuery, userIds, isVisible] ) useDebounce(