Skip to content

Commit

Permalink
Better handle if dataset has a fullname value (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
pushchris authored Sep 6, 2024
1 parent 2617cb9 commit 08b40c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/platform/src/users/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export class User extends Model {
}

get fullName() {
// Handle case were user has a full name attribute in data
const fullName = this.data.full_name ?? this.data.fullName
if (fullName) return fullName

// If no attribute exists, combine first and last name
const parts: string[] = []
if (this.firstName) {
parts.push(this.firstName)
Expand Down

0 comments on commit 08b40c2

Please sign in to comment.