Skip to content

Commit

Permalink
fix(rest): don't add empty query (#7308)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckohen authored Jan 20, 2022
1 parent d8ea572 commit d0fa5aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/rest/src/lib/RequestManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,10 @@ export class RequestManager extends EventEmitter {

// If a query option is passed, use it
if (request.query) {
query = `?${request.query.toString()}`;
const resolvedQuery = request.query.toString();
if (resolvedQuery !== '') {
query = `?${resolvedQuery}`;
}
}

// Create the required headers
Expand Down

0 comments on commit d0fa5aa

Please sign in to comment.