We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 842b67e commit 4420fdaCopy full SHA for 4420fda
1 file changed
src/client.ts
@@ -260,8 +260,9 @@ export class OzAPI {
260
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
261
262
const defaultQuery = this.defaultQuery();
263
- if (!isEmptyObj(defaultQuery)) {
264
- query = { ...defaultQuery, ...query };
+ const pathQuery = Object.fromEntries(url.searchParams);
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
265
+ query = { ...pathQuery, ...defaultQuery, ...query };
266
}
267
268
if (typeof query === 'object' && query && !Array.isArray(query)) {
0 commit comments