Skip to content

Commit

Permalink
Fixes pipedRequest for empty sets
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
  • Loading branch information
chrissrogers committed Nov 7, 2017
1 parent fbb652c commit dc8ecdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/recurly.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ export class Recurly extends Emitter {
return Object.assign({}, data, { [by]: piece });
});

if (chunks.length === 0) {
return Promise.denodeify(this.request.bind(this))(method, route, data);
}

return new Promise((resolve, reject) => {
const part = (err, res) => {
// if we have any errors that are not 404, reject
Expand Down

0 comments on commit dc8ecdf

Please sign in to comment.