Skip to content

Commit

Permalink
Fix trollboard crash (#2699)
Browse files Browse the repository at this point in the history
I haven't tested it yet since I'm not able to reproduce the crash
locally. But by reading the code, it should work lol
  • Loading branch information
notmd committed Apr 18, 2023
1 parent 3e703a0 commit 6ba240f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion website/src/lib/users.ts
Expand Up @@ -95,7 +95,10 @@ export const getBatchFrontendUserIdFromBackendUser = async (users: { username: s
const account = externalAccounts.find(
(a) => a.provider === users[userIdx].auth_method && a.providerAccountId === users[userIdx].username
);
outputIds[userIdx] = account.userId;
// TODO check why the account is undefined
if (account) {
outputIds[userIdx] = account.userId;
}
});

return outputIds;
Expand Down

0 comments on commit 6ba240f

Please sign in to comment.