mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fix gravatarLookup method
Closes #4511 - Add missing "return" - Fix error handling
This commit is contained in:
parent
09658f8377
commit
904727a927
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…
Add table
Reference in a new issue