mirror of
https://github.com/TryGhost/Ghost.git
synced 2023-12-13 21:00:40 +01:00
Merge pull request #4512 from sanddudu/patch-3
Fix gravatarLookup method
This commit is contained in:
commit
50cb92d4fd
1 changed files with 2 additions and 2 deletions
|
@ -862,13 +862,13 @@ User = ghostBookshelf.Model.extend({
|
|||
|
||||
return new Promise(function (resolve) {
|
||||
if (config.isPrivacyDisabled('useGravatar')) {
|
||||
resolve(userData);
|
||||
return resolve(userData);
|
||||
}
|
||||
|
||||
request({url: 'http:' + gravatarUrl, timeout: 2000}, function (err, response) {
|
||||
if (err) {
|
||||
// just resolve with no image url
|
||||
resolve(userData);
|
||||
return resolve(userData);
|
||||
}
|
||||
|
||||
if (response.statusCode !== 404) {
|
||||
|
|
Loading…
Reference in a new issue