mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 18:26:32 -05:00
Fix generateAvatarURL
Previously, we checked for `typeof email !== 'string'`. This code got turned into `email.length === 0`, which changed the behaviour of the method. Because TypeScript makes sure that `email` is always a string, we can get rid of the check altogether. Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
08655f06f9
commit
3262315248
1 changed files with 0 additions and 3 deletions
|
@ -25,9 +25,6 @@ export function generateAvatar (name: string): string {
|
|||
|
||||
export function generateAvatarURL (name: string, email = '', big = true): string {
|
||||
let photo
|
||||
if (email.length === 0) {
|
||||
email = '' + name + '@example.com'
|
||||
}
|
||||
name = encodeURIComponent(name)
|
||||
|
||||
const hash = createHash('md5')
|
||||
|
|
Loading…
Reference in a new issue