Permalink
Browse files

fix(http-client): don't call withParams if there are no params

  • Loading branch information...
EisenbergEffect committed Oct 7, 2017
1 parent 17cc4d7 commit 2cd076a3b2d9d5bb3f60d9e7d606253e5bd02f2c
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/http-client.js
View
@@ -129,7 +129,13 @@ export class HttpClient {
* @return {Promise} A cancellable promise object.
*/
get(url: string, params?: Object, traditional?: boolean): Promise<HttpResponseMessage> {
return this.createRequest(url).asGet().withParams(params, traditional).send();
let req = this.createRequest(url).asGet();
if (params) {
return req.withParams(params, traditional).send();
}
return req.send();
}
/**

0 comments on commit 2cd076a

Please sign in to comment.