Add posts to latest story
This commit is contained in:
parent
7bb8a952ef
commit
6dd8a92318
8 changed files with 51 additions and 31 deletions
|
|
@ -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}"`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue