use "undefined" as undefined in name pipe
This commit is contained in:
parent
61ae1e8bac
commit
4c0e6d1bed
@ -29,13 +29,11 @@ export class NamePipe implements PipeTransform {
|
||||
constructor(private readonly _userService: IqserUserService, private readonly _translateService: TranslateService) {}
|
||||
|
||||
transform(value: IqserUser | string, options: NamePipeOptions = this._defaultOptions): string {
|
||||
let name: string | undefined;
|
||||
|
||||
if (!value) {
|
||||
if (!value || value === 'undefined') {
|
||||
return this._getDefaultName(options);
|
||||
}
|
||||
|
||||
name = value ? this._userService.getName(value) : options.defaultValue;
|
||||
let name = value ? this._userService.getName(value) : options.defaultValue;
|
||||
|
||||
if (!name) {
|
||||
return this._getDefaultName(options);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user