Add posts to latest story

This commit is contained in:
Bad Manners 2024-08-08 09:49:11 -03:00
parent 7bb8a952ef
commit 6dd8a92318
8 changed files with 51 additions and 31 deletions

View file

@ -24,7 +24,7 @@ type ExportWebsiteName = typeof WEBSITE_LIST extends ReadonlyArray<{ website: in
function getUsernameForWebsite(user: CollectionEntry<"users">, website: Website): string {
const link = user.data.links[website];
if (link?.username) {
if (link && "username" in link && link.username) {
return link.username;
}
throw new Error(`Cannot get "${website}" username for user "${user.id}"`);