Skip to content

Commit

Permalink
Fix broken MembersTable (#10300)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount authored Jun 17, 2024
1 parent 07955f8 commit 0b4ea9a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ export default function MembersTable(props: MembersTableProps) {
() => (user == null ? null : { isPlaceholder: false, ...user }),
[user]
)

const backendListUsers = backendHooks.useBackendListUsers(backend)

const users = React.useMemo(
() =>
backendHooks.useBackendListUsers(backend) ??
backendListUsers ??
(populateWithSelf && userWithPlaceholder != null ? [userWithPlaceholder] : null),
[backend, populateWithSelf, userWithPlaceholder]
[backendListUsers, populateWithSelf, userWithPlaceholder]
)
const usersMap = React.useMemo(
() => new Map((users ?? []).map(member => [member.userId, member])),
Expand Down

0 comments on commit 0b4ea9a

Please sign in to comment.