We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0dc840 commit ff159b3Copy full SHA for ff159b3
src/core.ts
@@ -524,8 +524,9 @@ export abstract class APIClient {
524
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
525
526
const defaultQuery = this.defaultQuery();
527
- if (!isEmptyObj(defaultQuery)) {
528
- query = { ...defaultQuery, ...query } as Req;
+ const pathQuery = Object.fromEntries(url.searchParams);
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
529
+ query = { ...pathQuery, ...defaultQuery, ...query } as Req;
530
}
531
532
if (typeof query === 'object' && query && !Array.isArray(query)) {
0 commit comments