Error if defaultUrl not specified
Closed this issue · 5 comments
If the defaultAvatarUrl
option is not specified, trying to call indexOf
in the getUrl
function will throw an exception. Also, I noticed that the default.png
file that ships with the package is never used anywhere. You could potentially solve the indexOf
error by using the path to default.png
as a fallback for default url being undefined, but that raises the issue of whether you would prefer to show default.png
or the user initials. Since the packaged default.png
is in most cases going to be successfully loaded, using it as the fallback results in the initials being almost never shown.
Furthermore, I can't seem to get the initials to show at all. I tried providing no email hash and no default image, but the initials still didn't show up. The avatar just showed an image tag with no src
, and the initials were hidden.
Thanks for the bug report. I'll look into it and get back to you. The list of options did get more complicated with the addition of the initials avatar, so it's possible that something slipped through the cracks.
Cool, thanks. Would love to see the initials working, I tend to prefer them over gravatars.