Skip to content
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

Remove filtering of string forms of null and undefined #5075

Merged
merged 1 commit into from Dec 13, 2020
Merged

Remove filtering of string forms of null and undefined #5075

merged 1 commit into from Dec 13, 2020

Conversation

VoltrexKeyva
Copy link
Contributor

@VoltrexKeyva VoltrexKeyva commented Dec 3, 2020

Removed null and undefined being filtered out in string forms which caused issues in Client#api, closes issue: #5072

Please describe the changes this PR makes and why it should be merged:
This PR is meant to remove the filtering of string forms of null and undefined to prevent DiscordAPIError being thrown when given them as a string in the query of the Client#api
Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

Removed null and undefined being filtered out in string forms which caused issues in `<client>.api`, issue: #5072
@advaith1
Copy link
Contributor

advaith1 commented Dec 5, 2020

@Fyko looks like you added these in #4143, are they necessary?

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

Nice catch, LGTM

@VoltrexKeyva VoltrexKeyva changed the title Removed filtering of string forms of null and undefined Remove filtering of string forms of null and undefined Dec 12, 2020
@iCrawl iCrawl merged commit 9042d19 into discordjs:master Dec 13, 2020
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.

Client#api queries casts "null" and "undefined" to their actual value instead of counting them as a string
5 participants