1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-17 16:18:27 +09:00
cherrypick/packages/frontend/src/scripts/get-user-name.ts
2023-02-22 15:36:12 +09:00

4 lines
157 B
TypeScript

export default function(user: { name?: string | null, username: string }): string {
return user.name === '' ? user.username : user.name ?? user.username;
}