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

Fix incorrect handling of query parameters with values 0 or empty str… #4782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yukiyokotani
Copy link

fixes #4781

The generated code in RTK Query's CodeGeneration is modified as follows when encodeQueryParams is set to true:

Before:

queryArg.status
  ? encodeURIComponent(String(queryArg.status))
  : undefined,

After:

queryArg.status != null
  ? encodeURIComponent(String(queryArg.status))
  : undefined,

Copy link

codesandbox bot commented Dec 19, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bea930a:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit bea930a
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/67643a1478d45900085a4b92
😎 Deploy Preview https://deploy-preview-4782--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

Incorrect handling of query parameters with values 0 or empty strings in CodeGeneration output
1 participant