refactor(ApNoteService.ts): non-null assertion -> optional chaining

This commit is contained in:
okayurisotto 2023-07-02 19:06:24 +09:00
parent 71ca66e24e
commit 8ee31e8002

View File

@ -274,7 +274,7 @@ export class ApPersonService implements OnModuleInit {
alsoKnownAs: person.alsoKnownAs,
isExplorable: !!person.discoverable,
username: person.preferredUsername,
usernameLower: person.preferredUsername!.toLowerCase(),
usernameLower: person.preferredUsername?.toLowerCase(),
host,
inbox: person.inbox,
sharedInbox: person.sharedInbox ?? (person.endpoints ? person.endpoints.sharedInbox : undefined),