Skip to content

Commit

Permalink
Merge pull request #153 from Esri/bug/pass-through-false
Browse files Browse the repository at this point in the history
fix(request): ensure request is passed through as a request parameter
  • Loading branch information
jgravois authored Mar 5, 2018
2 parents 1173a88 + 77ad553 commit 43936f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/arcgis-rest-request/src/utils/process-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function processParams(params: any): any {

Object.keys(params).forEach(key => {
const param = params[key];
if (!param && param !== 0) {
if (!param && param !== 0 && typeof param !== "boolean") {
return;
}
const type = param.constructor.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ describe("processParams", () => {

it("should stringify booleans", () => {
const params = {
foo: true
foo: true,
bar: false
};

const expected = {
foo: "true"
foo: "true",
bar: "false"
};

expect(processParams(params)).toEqual(expected);
Expand Down

0 comments on commit 43936f7

Please sign in to comment.