Skip to content

Commit

Permalink
Merge pull request #125 from yahoo/fixUnhandledRejection
Browse files Browse the repository at this point in the history
chain promise to avoid bluebird's "Unhandled rejection" error
  • Loading branch information
lingyan committed Oct 1, 2015
2 parents 3f950df + 11ea633 commit e0cddfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/fetcher.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Request.prototype.end = function (callback) {
setImmediate(executeRequest, self, resolve, reject);
});

promise.then(function (result) {
promise = promise.then(function (result) {
if (result.meta) {
self.options._serviceMeta.push(result.meta)
};
Expand Down
2 changes: 1 addition & 1 deletion libs/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Request.prototype.end = function (callback) {
setImmediate(executeRequest, self, resolve, reject);
});

promise.then(function (result) {
promise = promise.then(function (result) {
if (result.meta) {
self.serviceMeta.push(result.meta)
};
Expand Down

0 comments on commit e0cddfc

Please sign in to comment.