kui-utils 0.0.16 → 0.0.17
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 +4 -2
- package/cjs/index.js.map +1 -1
- package/index.js +4 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2000,7 +2000,8 @@ var updateQueryParams = function (newLink) {
|
|
|
2000
2000
|
var hrefLinkParams = newLink.split(/\?|&/);
|
|
2001
2001
|
var hrefParams = Object.fromEntries(new URLSearchParams(hrefLinkParams.slice(1).join("&")).entries());
|
|
2002
2002
|
var searchParams = Object.fromEntries(searchQuery.entries());
|
|
2003
|
-
|
|
2003
|
+
// @ts-ignore
|
|
2004
|
+
var route = searchQuery.size ? hrefLinkParams[0] : window.location.pathname;
|
|
2004
2005
|
Object.keys(searchParams).forEach(function (key, index) {
|
|
2005
2006
|
if (key in hrefParams) {
|
|
2006
2007
|
searchParams[key] = hrefParams[key];
|
|
@@ -2011,7 +2012,8 @@ var updateQueryParams = function (newLink) {
|
|
|
2011
2012
|
}
|
|
2012
2013
|
});
|
|
2013
2014
|
Object.keys(hrefParams).forEach(function (key) {
|
|
2014
|
-
|
|
2015
|
+
// @ts-ignore
|
|
2016
|
+
route += "".concat(searchQuery.size ? "&" : "?").concat(key, "=").concat(hrefParams[key]);
|
|
2015
2017
|
});
|
|
2016
2018
|
window.history.pushState({ route: route }, "", route);
|
|
2017
2019
|
};
|