mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-17 23:45:29 -05:00
fix: remove useless assignment to local variable emailCopy (#1181)
This commit is contained in:
parent
ab56d750ca
commit
13b8347fdd
1 changed files with 2 additions and 3 deletions
|
@ -8,10 +8,9 @@ export const GRAVATAR_DEFAULT =
|
|||
* Generate gravatar url from email address
|
||||
*/
|
||||
export function generateGravatarUrl(email: string = ''): string {
|
||||
let emailCopy = email;
|
||||
if (_.isString(email) && _.size(email) > 0) {
|
||||
emailCopy = email.trim().toLocaleLowerCase();
|
||||
const emailMD5 = stringToMD5(emailCopy);
|
||||
email = email.trim().toLocaleLowerCase();
|
||||
const emailMD5 = stringToMD5(email);
|
||||
return `https://www.gravatar.com/avatar/${emailMD5}`;
|
||||
}
|
||||
return GRAVATAR_DEFAULT;
|
||||
|
|
Loading…
Add table
Reference in a new issue