Skip to content

Commit 6ba240f

Browse files
authored
Fix trollboard crash (#2699)
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
1 parent 3e703a0 commit 6ba240f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

website/src/lib/users.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ export const getBatchFrontendUserIdFromBackendUser = async (users: { username: s
9595
const account = externalAccounts.find(
9696
(a) => a.provider === users[userIdx].auth_method && a.providerAccountId === users[userIdx].username
9797
);
98-
outputIds[userIdx] = account.userId;
98+
// TODO check why the account is undefined
99+
if (account) {
100+
outputIds[userIdx] = account.userId;
101+
}
99102
});
100103

101104
return outputIds;

0 commit comments

Comments
 (0)