Fix extra space
This commit is contained in:
@@ -6,7 +6,7 @@ import { Pipe, PipeTransform } from '@angular/core';
|
|||||||
export class FullNamePipe implements PipeTransform {
|
export class FullNamePipe implements PipeTransform {
|
||||||
transform(person: any, args?: any): any {
|
transform(person: any, args?: any): any {
|
||||||
if (person) {
|
if (person) {
|
||||||
return [person.firstName, person.middleName, person.lastName].join(" ");
|
return [person.firstName, person.middleName, person.lastName].filter(Boolean).join(" ");
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user