Skip to content

Conversation

@aaronfullerton
Copy link
Contributor

Currently, when passing a boolean query parameter with a value of false to http, the following error surfaces:

 TypeError: value.map is not a function
      at formatValue (src/http.js:171:16)
      at src/http.js:187:36
      at Array.reduce (native)
      at encodeFormOrQuery (src/http.js:182:42)
      at Context.<anonymous> (test/http.js:218:14)

This PR resolves this error by adding a boolean type check in the formatValue function.

@webron webron requested a review from shockey June 30, 2017 22:22
Copy link
Contributor

@shockey shockey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shockey
Copy link
Contributor

shockey commented Jul 7, 2017

Thanks for the PR, @aaronfullerton! Appreciate you taking the time to fix that issue.

@shockey shockey merged commit 6756717 into swagger-api:master Jul 7, 2017
@aaronfullerton aaronfullerton deleted the fix-falsy-formatValue branch July 18, 2017 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants