diff --git a/lib/User.js b/lib/User.js index e1df044..d8c7942 100644 --- a/lib/User.js +++ b/lib/User.js @@ -61,7 +61,7 @@ class User { get fullName() { let name = `${this.firstName} `; - if (this.otherNames.length > 0) + if (this?.otherNames?.length > 0) name += `${this.otherNames} `; name += this.lastName;