@homecode/ui 4.18.27 → 4.18.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,10 +16,11 @@ function stringifyQueryParams(params) {
16
16
  .join('&');
17
17
  }
18
18
  function applyQueryParams(path, queryParams, currParams) {
19
+ const clearPath = path.replace(/\?.*/, '/');
19
20
  if (!queryParams) {
20
21
  if (Object.keys(currParams).length === 0)
21
22
  return path;
22
- return `${path}?${stringifyQueryParams(currParams)}`;
23
+ return `${clearPath}?${stringifyQueryParams(currParams)}`;
23
24
  }
24
25
  if (typeof queryParams === 'string') {
25
26
  return queryParams;
@@ -32,8 +33,8 @@ function applyQueryParams(path, queryParams, currParams) {
32
33
  query[key] = value;
33
34
  });
34
35
  if (Object.keys(query).length === 0)
35
- return path;
36
- return `${path}?${stringifyQueryParams(query)}`;
36
+ return clearPath;
37
+ return `${clearPath}?${stringifyQueryParams(query)}`;
37
38
  }
38
39
  const setSSRQueryParams = (params) => {
39
40
  Object.assign(SSRQueryParams, params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.18.27",
3
+ "version": "4.18.28",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",