Skip to content

Fixed a crash upon trying to use query param with no value #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

zneix
Copy link
Contributor

@zneix zneix commented Jul 14, 2021

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

Fixes a crash upon trying to execute an API request with query parameters that have no value (value of -q flag doesn't contain "=").
To reproduce, run an example command: twitch api get streams -q user_login

Description of Changes:

Changed names of some variables to make it more clear what is what and made added a vairable with empty string as a fallback in case query param's value isn't specified.

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

@lleadbet lleadbet self-requested a review July 14, 2021 20:15
@lleadbet lleadbet merged commit daa4458 into twitchdev:main Jul 14, 2021
@zneix zneix deleted the zneix/fix/query-param-crash branch July 14, 2021 20:25
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