We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e885d3 commit 2e95c34Copy full SHA for 2e95c34
1 file changed
src/client.ts
@@ -398,8 +398,9 @@ export class Flowglad {
398
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
399
400
const defaultQuery = this.defaultQuery();
401
- if (!isEmptyObj(defaultQuery)) {
402
- query = { ...defaultQuery, ...query };
+ const pathQuery = Object.fromEntries(url.searchParams);
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
403
+ query = { ...pathQuery, ...defaultQuery, ...query };
404
}
405
406
if (typeof query === 'object' && query && !Array.isArray(query)) {
0 commit comments