Merge pull request #135 from KonradLinkowski/patch-1
Change size existence check to default value
This commit is contained in:
Коммит
dfa9150489
|
@ -77,10 +77,7 @@ userSchema.methods.comparePassword = comparePassword;
|
|||
/**
|
||||
* Helper method for getting user's gravatar.
|
||||
*/
|
||||
userSchema.methods.gravatar = function (size: number) {
|
||||
if (!size) {
|
||||
size = 200;
|
||||
}
|
||||
userSchema.methods.gravatar = function (size: number = 200) {
|
||||
if (!this.email) {
|
||||
return `https://gravatar.com/avatar/?s=${size}&d=retro`;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче