fix: check user exists before we try and set it in the map

This commit is contained in:
zkldi
2022-06-30 14:24:03 +01:00
parent 29147ca945
commit ee25b34648
@@ -147,9 +147,11 @@ function InternalGPTChartPage({
userMap.set(user.id, user);
}
}
// Add current user, since there's no guarantee they are returned from either API.
userMap.set(user.id, user);
if (user) {
// Add current user, since there's no guarantee they are returned from either API.
userMap.set(user.id, user);
}
return (
<Row>