mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Fix initials avatar generation (#577)
The ES5 reduce method also needs a initial value. This bug was
introduced in aa974aa54a
.
This commit is contained in:
parent
90428e7ba1
commit
3a0a9fa009
1 changed files with 2 additions and 2 deletions
|
@ -68,9 +68,9 @@ Users.helpers({
|
|||
return profile.initials;
|
||||
|
||||
else if (profile.fullname) {
|
||||
return profile.fullname.split(/\s+/).reduce((memo = '', word) => {
|
||||
return profile.fullname.split(/\s+/).reduce((memo, word) => {
|
||||
return memo + word[0];
|
||||
}).toUpperCase();
|
||||
}, '').toUpperCase();
|
||||
|
||||
} else {
|
||||
return this.username[0].toUpperCase();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue