Skip to content

Commit 92db1da

Browse files
CO0Ki3dkh0324
andauthored
docs: explain stripping undefined params before URLSearchParams (#5147)
Co-authored-by: dkh0324 <dkh0324@midasin.com>
1 parent 39e7c8f commit 92db1da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/rtk-query/api/fetchBaseQuery.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ type prepareHeaders = (
173173

174174
_(optional)_
175175

176-
A function that can be used to apply custom transformations to the data passed into [`params`](#setting-the-query-string). If you don't provide this, `params` will be given directly to `new URLSearchParams()`. With some API integrations, you may need to leverage this to use something like the [`query-string`](https://github.com/sindresorhus/query-string) library to support different array types.
176+
A function that can be used to apply custom transformations to the data passed into [`params`](#setting-the-query-string). If you don't provide this, `params` will be stripped of keys with `undefined` values, and then passed to `new URLSearchParams()`. With some API integrations, you may need to leverage this to use something like the [`query-string`](https://github.com/sindresorhus/query-string) library to support different array types.
177177

178178
### `fetchFn`
179179

0 commit comments

Comments
 (0)