Skip to content

Conversation

@mikeangstadt
Copy link

Currently, if a query param's value is numeric zero - it will not be included in a formatted URL.

This fixes the issue by explicitly testing qval.

lib/generator.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This was originally meant to prevent empty query params from being on the url.

So this is more explicit in dealing with types than checking undefined.

qval = qval.toString()
if (qval != "")

Copy link
Author

Choose a reason for hiding this comment

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

cool, I've made the update. thanks.

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