Skip to content

Commit

Permalink
fix: don't throw error if callback provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Drukh committed Aug 23, 2018
1 parent 64d9ad2 commit 6938cf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/request/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function (payload, callback) {
})
.catch(function (error) {
if (callback) {
callback(error);
return callback(error);
}
throw error;
});
Expand Down

0 comments on commit 6938cf2

Please sign in to comment.