HaithemMosbahi/ngx-avatar

Name should be trimmed

burakkilic opened this issue · 2 comments

Hi,

I was setting ngx-avatar's name attribute to my user's Full Name. I get some errors like toUpper case is not a function. Then I realized ngx-avatar splitting the name by whitespace, and some of my users have whitespace in leading in their names. So an error occurs.

Maybe I am the one who should trim the name before saving to the db but also it can be added to the library.

Thank you

Hi,
Thank you for raising this issue. Yes I agree with you, this should be added to the library. I will fix this asap.

Hi,
Sorry for my late reply, I was too busy. I just published a new version ( 2.9.0 ) which includes the commit that fixes this issue