kui-utils 0.0.25 → 0.0.26

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.
package/cjs/index.js CHANGED
@@ -2022,13 +2022,14 @@ var toNumber = function (value) {
2022
2022
  : null;
2023
2023
  };
2024
2024
 
2025
- var updateQueryParams = function (newLink) {
2025
+ var updateQueryParams = function (newLink, withBase) {
2026
2026
  var searchQuery = new URLSearchParams(window.location.search);
2027
2027
  var hrefLinkParams = newLink.split(/\?|&/);
2028
2028
  var hrefParams = Object.fromEntries(new URLSearchParams(hrefLinkParams.slice(1).join("&")).entries());
2029
2029
  var searchParams = Object.fromEntries(searchQuery.entries());
2030
+ var route =
2030
2031
  // @ts-ignore
2031
- var route = searchQuery.size ? hrefLinkParams[0] : window.location.pathname;
2032
+ searchQuery.size && !withBase ? hrefLinkParams[0] : window.location.pathname;
2032
2033
  Object.keys(searchParams).forEach(function (key, index) {
2033
2034
  if (key in hrefParams) {
2034
2035
  searchParams[key] = hrefParams[key];