mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
Properly return a bluebird promise (#8988)
refs #8980 - ☹️ apparently this is actually the only way
This commit is contained in:
parent
f320af4534
commit
45fd2d437f
@ -13,12 +13,14 @@ module.exports = function request(url, options) {
|
||||
}));
|
||||
}
|
||||
|
||||
return got(
|
||||
url,
|
||||
options
|
||||
).then(function (response) {
|
||||
return Promise.resolve(response);
|
||||
}).catch(function (err) {
|
||||
return Promise.reject(err);
|
||||
return new Promise(function (resolve, reject) {
|
||||
return got(
|
||||
url,
|
||||
options
|
||||
).then(function (response) {
|
||||
return resolve(response);
|
||||
}).catch(function (err) {
|
||||
return reject(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user